[patch 63/74] USB: usbfs: fix -ENOENT error code to be -ENODEV

From: Greg KH
Date: Thu Aug 13 2009 - 16:02:43 EST


2.6.30-stable review patch. If anyone has any objections, please let us know.

------------------

From: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

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@xxxxxxxxxxxxxxxxxxx>
CC: Kay Sievers <kay.sievers@xxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>

---
drivers/usb/core/devio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -582,7 +582,7 @@ static int usbdev_open(struct inode *ino
if (!ps)
goto out;

- ret = -ENOENT;
+ ret = -ENODEV;

/* usbdev device-node */
if (imajor(inode) == USB_DEVICE_MAJOR)


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/