staging:media: remove assignment in if condition
authorHimangi Saraogi <himangi774@gmail.com>
Sat, 1 Mar 2014 20:48:38 +0000 (02:18 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 21:14:14 +0000 (13:14 -0800)
This patch removes the assignment in if conditions to do away with the
checkpatch warning :'do not use assignment in if condition'.

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/media/sn9c102/sn9c102_core.c

index 2cb44de2b92cb18513a7d18ec41d8838828c2def..7be25b0ffae611dd661bfb8f54f312cd725bc53a 100644 (file)
@@ -3250,7 +3250,8 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
        unsigned int i;
        int err = 0, r;
 
-       if (!(cam = kzalloc(sizeof(struct sn9c102_device), GFP_KERNEL)))
+       cam = kzalloc(sizeof(struct sn9c102_device), GFP_KERNEL);
+       if (!cam)
                return -ENOMEM;
 
        cam->usbdev = udev;
@@ -3262,13 +3263,15 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
                goto fail;
        }
 
-       if (!(cam->control_buffer = kzalloc(8, GFP_KERNEL))) {
+       cam->control_buffer = kzalloc(8, GFP_KERNEL);
+       if (!cam->control_buffer) {
                DBG(1, "kzalloc() failed");
                err = -ENOMEM;
                goto fail;
        }
 
-       if (!(cam->v4ldev = video_device_alloc())) {
+       cam->v4ldev = video_device_alloc();
+       if (!cam->v4ldev) {
                DBG(1, "video_device_alloc() failed");
                err = -ENOMEM;
                goto fail;
This page took 0.026843 seconds and 5 git commands to generate.