public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: linux-kernel@vger.kernel.org, linux-usb-devel@lists.sourceforge.net
Cc: stelian@popies.net
Subject: [PATCH] USB: fix hid core to return proper error code from probe
Date: Wed, 22 Jun 2005 23:10:30 -0700	[thread overview]
Message-ID: <11195070302202@kroah.com> (raw)
In-Reply-To: <20050623060933.GA11578@kroah.com>

[PATCH] USB: fix hid core to return proper error code from probe

Drivers need to return -ENODEV when they can't bind to a device.
Anything else stops the "bind a device to a driver" search.

From: Stelian Pop <stelian@popies.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

---
commit 479f6ea85e513551510ad52f37e69e1c596ad356
tree 60eadfd85297f42be75be8863cacbc0ea9d82f3b
parent b7c84c6ada2be942eca6722edb2cfaad412cd5de
author Stelian Pop <stelian@popies.net> Wed, 22 Jun 2005 17:53:28 +0200
committer Greg Kroah-Hartman <gregkh@suse.de> Wed, 22 Jun 2005 23:01:09 -0700

 drivers/usb/input/hid-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c
+++ b/drivers/usb/input/hid-core.c
@@ -1762,7 +1762,7 @@ static int hid_probe(struct usb_interfac
 			intf->altsetting->desc.bInterfaceNumber);
 
 	if (!(hid = usb_hid_configure(intf)))
-		return -EIO;
+		return -ENODEV;
 
 	hid_init_reports(hid);
 	hid_dump_device(hid);
@@ -1777,7 +1777,7 @@ static int hid_probe(struct usb_interfac
 	if (!hid->claimed) {
 		printk ("HID device not claimed by input or hiddev\n");
 		hid_disconnect(intf);
-		return -EIO;
+		return -ENODEV;
 	}
 
 	printk(KERN_INFO);


  reply	other threads:[~2005-06-23  6:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23  6:09 [GIT PATCH] 2 small Driver core fixes for 2.6.12-git Greg KH
2005-06-23  6:10 ` Greg KH [this message]
2005-06-23  6:10   ` [PATCH] driver core: Fix up the device_attach() error handling in bus_add_device() Greg KH

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=11195070302202@kroah.com \
    --to=gregkh@suse.de \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=stelian@popies.net \
    /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