Commit 41df49e0 authored by Himangi Saraogi's avatar Himangi Saraogi Committed by Greg Kroah-Hartman

staging:media: remove assignment in if condition

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: default avatarHimangi Saraogi <himangi774@gmail.com>
Acked-by: default avatarPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent baf8aea4
...@@ -3250,7 +3250,8 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) ...@@ -3250,7 +3250,8 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
unsigned int i; unsigned int i;
int err = 0, r; 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; return -ENOMEM;
cam->usbdev = udev; cam->usbdev = udev;
...@@ -3262,13 +3263,15 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id) ...@@ -3262,13 +3263,15 @@ sn9c102_usb_probe(struct usb_interface* intf, const struct usb_device_id* id)
goto fail; 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"); DBG(1, "kzalloc() failed");
err = -ENOMEM; err = -ENOMEM;
goto fail; goto fail;
} }
if (!(cam->v4ldev = video_device_alloc())) { cam->v4ldev = video_device_alloc();
if (!cam->v4ldev) {
DBG(1, "video_device_alloc() failed"); DBG(1, "video_device_alloc() failed");
err = -ENOMEM; err = -ENOMEM;
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment