usb: cdc-acm: Decrement tty port's refcount if probe() fail
Oliver Neukum
Acked-byQuoted 10 lines · Jaejoong Kim
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_portis '0', we can clean up the cdc-acm driver by calling the .destruct() callback function of structtty_port_operations.The problem is the
destruct()callback function is not called if theprobe()fails, because tty_port's refcount is not zero. So, addtty_port_put()whenprobe()fails.Signed-off-by Jaejoong Kim <[email protected]>
Acked-by Oliver Neukum <[email protected]>
---
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html