Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01105a24 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

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: default avatarAlan Stern <stern@rowland.harvard.edu>
CC: Kay Sievers <kay.sievers@vrfy.org>
Cc: stable <stable@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e8e2ff46
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)