]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
USB: usbfs: fix -ENOENT error code to be -ENODEV
authorAlan Stern <stern@rowland.harvard.edu>
Thu, 30 Jul 2009 19:28:14 +0000 (15:28 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 16 Aug 2009 21:19:05 +0000 (14:19 -0700)
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>
drivers/usb/core/devio.c

index ef03927f85dc7d5088c16731f24a9145c9b0ebe4..0cdcbcd663bda81fc9d4bad89071daa8fbd9cc77 100644 (file)
@@ -582,7 +582,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)