usb: gadget: qti: Avoid passing NULL to disconnect()
When QTI control gets disconnected from an RmNet function,
it calls frmnet_disconnect() via the grmnet->disconnect
callback using port->port_usb, which gets set to NULL later
in the same context. However, if for some reason this
gqti_ctrl_disconnect() function is called again (such as
for spurious suspend events when remote wakeup is disabled),
this NULL pointer would be psased to frmnet_disconnect() which
then spits out an error message.
While the cause of spurious suspends also needs to be solved,
we can at least avoid excessive log spam by instead passing
the grmnet pointer directly which should be a valid pointer--
frmnet_disconnect() will correctly and silently bail out if it
is already disconnected.
Change-Id: I517a7a9cb9341cda16db7d369006510529ce193b
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment