USB: usbfs: fix -ENOENT error code to be -ENODEV

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>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Alan Stern 2009-07-30 15:28:14 -04:00 коммит произвёл Greg Kroah-Hartman
Родитель e8e2ff462d
Коммит 01105a2463
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -595,7 +595,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)