linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Heiner Kallweit <hkallweit1@gmail.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 10:05:15 +0200	[thread overview]
Message-ID: <1465891515.29352.3.camel@suse.com> (raw)
In-Reply-To: <8474eef0-3895-70db-c21a-3040417157df@gmail.com>

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.

> +	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



  reply	other threads:[~2016-06-14  8:09 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 [this message]
2016-06-14 19:34   ` Heiner Kallweit
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=1465891515.29352.3.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hkallweit1@gmail.com \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    /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).