usb: serial: Check online state of serial port before disable
Func_set_alt is not issued as a part of usb_add_function.
But we call func_disable in usb_remove_function. This
can lead to a crash in conditions such as USB is in low
power mode because of previous unbind. Fix this by
checking the online state of gser port, which is set
in func_set_alt. If not set, then return and avoid the
potential crash.
Change-Id: I567e8fc0a67d05f5b44c224002030b017f543a38
Signed-off-by:
Ajay Agarwal <ajaya@codeaurora.org>
Loading
Please register or sign in to comment