usb: diag_bridge: Fix NULL pointer crash during disconnect

DIAG I/O could be executing concurrently when the device/interface
is disconnected. In such cases the usb_interface pointer could
become NULL while the read or write functions are about to access
it. Prevent these NULL pointer dereferences by guarding the
pointer with a mutex.

CRs-fixed: 393826
Change-Id: I16a4a8d928f5e18531627b03f2ce6358ec3a9d1f
Signed-off-by: Jack Pham <jackp@codeaurora.org>
1 file changed