From: Heiner Kallweit <hkallweit1@gmail.com>
To: Oliver Neukum <oneukum@suse.com>
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>,
Jiri Kosina <jikos@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-input@vger.kernel.org,
Linux USB Mailing List <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] hid: migrate Dream Cheeky LED driver from USB misc to HID
Date: Tue, 14 Jun 2016 21:34:20 +0200 [thread overview]
Message-ID: <9d2c2ae6-3340-55e4-03f5-1fc95b2517cb@gmail.com> (raw)
In-Reply-To: <1465891515.29352.3.camel@suse.com>
Am 14.06.2016 um 10:05 schrieb Oliver Neukum:
> On Tue, 2016-06-14 at 07:51 +0200, Heiner Kallweit wrote:
>
>> + ret = hid_hw_start(hdev, HID_CONNECT_HIDRAW);
>> + if (ret)
>> + return ret;
>> +
>> + minor = ((struct hidraw *) hdev->hidraw)->minor;
>> +
>> + ret = dc_init_device(dcdev);
>
> That is a race condition. You announced an uninitialized device to the
> rest of the system.
>
I don't see a race. The hdev and lock elements of dcdev are initialized
and dc_init_device just calls dc_send to send the init command to the device.
It doesn't announce anything.
>> + if (ret)
>> + goto err;
>> +
>> + ret = dc_init_rgb(dcdev, minor);
>> + if (ret)
>> + goto err;
>> +
>> + dev_info(&hdev->dev, "Dream Cheeky Webmail Notifier %d initialized\n", minor);
>> +
>> + return 0;
>> +
>> +err:
>> + hid_hw_stop(hdev);
>> + return ret;
>> +}
>
> Regards
> Oliver
>
>
>
next prev parent reply other threads:[~2016-06-14 19:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 5:51 [PATCH] hid: migrate Dream Cheeky LED driver from USB misc to HID Heiner Kallweit
2016-06-14 8:05 ` Oliver Neukum
2016-06-14 19:34 ` Heiner Kallweit [this message]
2016-06-14 19:57 ` Oliver Neukum
2016-06-14 20:58 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9d2c2ae6-3340-55e4-03f5-1fc95b2517cb@gmail.com \
--to=hkallweit1@gmail.com \
--cc=benjamin.tissoires@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=jikos@kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).