Loading
USB: gadget: u_smd: Fix NULL pointer crash issue
When cable is disconnected during smd data transfers, there
is a chance that gsmd_disconnect() and smd notify callback for close
event can race each other and results in NULL pointer deference crash.
Hence fix it by checking port_usb pointer in gsmd_stop_io
and access the values only if port_usb pointer is not NULL.
Change-Id: I4414ebdc4862a82f9e3e7480fae04e503c4bc27c
Signed-off-by:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>