Skip to content

Commit

Permalink
USB: usbfs: fix -ENOENT error code to be -ENODEV
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Aug 7, 2009
1 parent e8e2ff4 commit 01105a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/devio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 01105a2

Please sign in to comment.