usb: gadget: Mark notify_modem as NULL on usb_cser_disconnect
On some targets, f_serial switches transport path from char_bridge to TTY in DUN+SoftAP scenario. As a part of that, we call usb_cser_disconnect but notify_modem callback is still marked as usb_cser_notify_modem. Then on getting a SETUP req from host PC, usb_cser_notify_modem is called which can lead to NULL pointer dereference because port_usb is NULL. Fix this by marking notify_modem callback as NULL on usb_cser_disconnect. Change-Id: I4470030cde6f38b905f7a88e16ed9f261a8954d6 Signed-off-by:Ajay Agarwal <ajaya@codeaurora.org> Signed-off-by:
Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
Loading
Please register or sign in to comment