@@ -308,7 +308,7 @@ static int uvc_status_start(struct uvc_device *dev, gfp_t flags)
{
lockdep_assert_held(&dev->status_lock);
- if (dev->int_urb == NULL)
+ if (!dev->int_urb)
return 0;
return usb_submit_urb(dev->int_urb, flags);
@@ -320,6 +320,9 @@ static void uvc_status_stop(struct uvc_device *dev)
lockdep_assert_held(&dev->status_lock);
+ if (!dev->int_urb)
+ return;
+
/*
* Prevent the asynchronous control handler from requeing the URB. The
* barrier is needed so the flush_status change is visible to other