aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pwc/pwc-if.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pwc/pwc-if.c')
-rw-r--r--drivers/media/video/pwc/pwc-if.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/video/pwc/pwc-if.c b/drivers/media/video/pwc/pwc-if.c
index f991d72fe108..e0a453a6543d 100644
--- a/drivers/media/video/pwc/pwc-if.c
+++ b/drivers/media/video/pwc/pwc-if.c
@@ -915,7 +915,7 @@ static void pwc_iso_stop(struct pwc_device *pdev)
915 struct urb *urb; 915 struct urb *urb;
916 916
917 urb = pdev->sbuf[i].urb; 917 urb = pdev->sbuf[i].urb;
918 if (urb != 0) { 918 if (urb) {
919 PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb); 919 PWC_DEBUG_MEMORY("Unlinking URB %p\n", urb);
920 usb_kill_urb(urb); 920 usb_kill_urb(urb);
921 } 921 }
@@ -931,7 +931,7 @@ static void pwc_iso_free(struct pwc_device *pdev)
931 struct urb *urb; 931 struct urb *urb;
932 932
933 urb = pdev->sbuf[i].urb; 933 urb = pdev->sbuf[i].urb;
934 if (urb != 0) { 934 if (urb) {
935 PWC_DEBUG_MEMORY("Freeing URB\n"); 935 PWC_DEBUG_MEMORY("Freeing URB\n");
936 usb_free_urb(urb); 936 usb_free_urb(urb);
937 pdev->sbuf[i].urb = NULL; 937 pdev->sbuf[i].urb = NULL;
@@ -1759,8 +1759,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id
1759 1759
1760 /* Allocate video_device structure */ 1760 /* Allocate video_device structure */
1761 pdev->vdev = video_device_alloc(); 1761 pdev->vdev = video_device_alloc();
1762 if (pdev->vdev == 0) 1762 if (!pdev->vdev) {
1763 {
1764 PWC_ERROR("Err, cannot allocate video_device struture. Failing probe."); 1763 PWC_ERROR("Err, cannot allocate video_device struture. Failing probe.");
1765 kfree(pdev); 1764 kfree(pdev);
1766 return -ENOMEM; 1765 return -ENOMEM;