Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c9cb4f70 authored by Ajay Agarwal's avatar Ajay Agarwal
Browse files

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: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent d3fb4173
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment