usb: gadget: f_gsi: Fix NULL pointer dereference
If modem SSR happenes with restart_level as RELATED and
somehow function unbind/bind gets called then NULL pointer
dereference is happening since by the time modem restarts
gsi_bind fails and hence gadget start fails leading config
to be removed from the list. In the meantime if ioctl call
comes from user space then since modem is offline and sm_state
is initialized driver will try to send control notification
where NULL pointer dereference occurred while accessing
gsi->function.config. Fix this by adding a NULL pointer check
before the assignment.
Change-Id: I1c10e0080f12cf3ab79a0e240566d25e40c1e875
Signed-off-by:
Pratham Pratap <prathampratap@codeaurora.org>
Loading
Please register or sign in to comment