git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
acm: Fix oops when closing ACM tty device right after open has failed.
[safe/jmp/linux-2.6]
/
drivers
/
usb
/
class
/
cdc-acm.c
diff --git
a/drivers/usb/class/cdc-acm.c
b/drivers/usb/class/cdc-acm.c
index
02eb60b
..
3f10459
100644
(file)
--- a/
drivers/usb/class/cdc-acm.c
+++ b/
drivers/usb/class/cdc-acm.c
@@
-677,7
+677,7
@@
static void acm_tty_close(struct tty_struct *tty, struct file *filp)
/* Perform the closing process and see if we need to do the hardware
shutdown */
/* Perform the closing process and see if we need to do the hardware
shutdown */
- if (tty_port_close_start(&acm->port, tty, filp) == 0)
+ if (
!acm ||
tty_port_close_start(&acm->port, tty, filp) == 0)
return;
acm_port_down(acm, 0);
tty_port_close_end(&acm->port, tty);
return;
acm_port_down(acm, 0);
tty_port_close_end(&acm->port, tty);