diff options
author | Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> | 2009-06-25 09:41:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-25 14:24:26 -0400 |
commit | 42dd2aa6496a2e87e496aac5494d2e1d6096c85b (patch) | |
tree | 81ef166b1155f557574972d6452dfb2d7a1943ba /drivers/usb/class | |
parent | a37f6b84c4f3d3ca61634a7b36bf64c6ea452271 (diff) |
acm: Return ENODEV instead of EINVAL when trying to open ACM device.
This is required, otherwise a user will get a EINVAL while opening a
non-existing device, instead of ENODEV.
This is what I get with this patch applied now instead of an "Invalid
argument".
cascardo@vespa:~$ cat /dev/ttyACM0
cat: /dev/ttyACM0: No such device
cascardo@vespa:~$
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/class')
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 38bfdb0f6660..02eb60bb6795 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c | |||
@@ -550,7 +550,7 @@ static void acm_waker(struct work_struct *waker) | |||
550 | static int acm_tty_open(struct tty_struct *tty, struct file *filp) | 550 | static int acm_tty_open(struct tty_struct *tty, struct file *filp) |
551 | { | 551 | { |
552 | struct acm *acm; | 552 | struct acm *acm; |
553 | int rv = -EINVAL; | 553 | int rv = -ENODEV; |
554 | int i; | 554 | int i; |
555 | dbg("Entering acm_tty_open."); | 555 | dbg("Entering acm_tty_open."); |
556 | 556 | ||