summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2009-07-30 23:28:14 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-08-17 01:27:30 +0400
commit3e16ba377737c5815cd1d6315c3cffe9c6e388ad (patch)
treef29ce95e2a2c3ae20a0336cd42624f4e7b6dbbb1
parent11c1ac9a64dd2d3ff5a7dc3bce57acf61bd8cd7f (diff)
downloadlinux-3e16ba377737c5815cd1d6315c3cffe9c6e388ad.tar.xz
USB: usbfs: fix -ENOENT error code to be -ENODEV
commit 01105a246345f011fde64d24a601090b646e9e4c upstream. This patch (as1272) changes the error code returned when an open call for a USB device node fails to locate the corresponding device. The appropriate error code is -ENODEV, not -ENOENT. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/devio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 58375d0d5260..33b29350586d 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -579,7 +579,7 @@ static int usbdev_open(struct inode *inode, struct file *file)
if (!ps)
goto out;
- ret = -ENOENT;
+ ret = -ENODEV;
/* usbdev device-node */
if (imajor(inode) == USB_DEVICE_MAJOR)