usb: f_qdss: Setting channel to NULL in qdss_close

When qdss_close is executed before disconnect_work
there is possibility that from disconnect_work channel
priv would be passed as NULL to the notifier resulting
in page fault error.

Fix this by setting notify to NULL on qdss_close.

Change-Id: Ifdfc43733221fdc1dc3bcd8a40f32e1b021398a8
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
This commit is contained in:
Udipto Goswami 2020-04-15 14:35:52 +05:30 • committed by Gerrit - the friendly Code Review server
commit 593dbeea3e

View file

@ -973,6 +973,7 @@ void usb_qdss_close(struct usb_qdss_ch *ch)
usb_qdss_free_req(ch);
ch->priv_usb = NULL;
ch->notify = NULL;
if (!qdss || !qdss->usb_connected ||
!strcmp(qdss->ch.name, USB_QDSS_CH_MDM)) {
ch->app_conn = 0;