usb: gadget: f_uvc: Fix crash on disconnect/connect during streaming

The driver does a BUG_ON after cable connect if the
previous session of streaming is not closed. Fix this
by returning an error if the previous session of streaming
is not closed.
The user space application needs to close the streaming
after cable disconnect.

Change-Id: Ide47378efb0cdd0bef30ff7aa142a628eb1c962e
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
1 file changed