aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorJaejoong Kim <[email protected]>2018-06-21 08:45:05 +0000
committerGreg Kroah-Hartman <[email protected]>2018-06-25 13:58:26 +0000
commitcae2bc768d176bfbdad7035bbcc3cdc973eb7984 (patch)
tree09cd58c17e3575c3a4698271c0f9e403591cc050 /drivers/usb/class/cdc-acm.h
parentUSB: mon: use ktime_get_real_ts64 instead of getnstimeofday64 (diff)
downloadkernel-cae2bc768d176bfbdad7035bbcc3cdc973eb7984.tar.gz
kernel-cae2bc768d176bfbdad7035bbcc3cdc973eb7984.zip
usb: cdc-acm: Decrement tty port's refcount if probe() fail
The cdc-acm driver does not have a refcount of itself, but uses a tty_port's refcount. That is, if the refcount of tty_port is '0', we can clean up the cdc-acm driver by calling the .destruct() callback function of struct tty_port_operations. The problem is the destruct() callback function is not called if the probe() fails, because tty_port's refcount is not zero. So, add tty_port_put() when probe() fails. Signed-off-by: Jaejoong Kim <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
0 files changed, 0 insertions, 0 deletions