usb: gadget: f_mbim: Fix crash on cable disconnect when no set alt
f_mbim driver set the port, enable endpoints and open bam pipes
only when the host sent set_alt=1. In other cases (for example
using non Win8 host), set_alt=1 will not occur.
Bail out from mbim_disable() in case set_alt=1 did not happen, to avoid
the case that the port was not initialized. Specifically this fix avoid
a crash of trying to lock uninitialized spinlock port->lock.
CRs-Fixed: 690719
Change-Id: I48667c94e07b92da3a814b9501428b84bb2a2bd1
Signed-off-by:
Ido Shayevitz <idos@codeaurora.org>
Loading
Please register or sign in to comment