usb: diag: Check for USB connect state in usb_diag_read/write

With new composition framework unbind function of the driver
is called during composition switch. This results in NULL
pointer dereference in usb_diag_read/write while trying to
access priv_usb field of usb_diag_ch.
WIth the previous compositon framework unbind function was not
called, hence, this issue was also not observed.

Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
1 file changed