diff options
| author | Himangi Saraogi <himangi774@gmail.com> | 2014-03-02 00:48:38 +0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-08 01:14:14 +0400 |
| commit | 41df49e0ca9582bf228d4ae6960201a792bbdbf5 (patch) | |
| tree | d44d827dcd643ce3303c4f4d43421fad0596e353 | |
| parent | baf8aea4e9a7f1228e4a415fe2bb1bc8ef151e8f (diff) | |
| download | linux-41df49e0ca9582bf228d4ae6960201a792bbdbf5.tar.xz | |
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: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| -rw-r--r-- | drivers/staging/media/sn9c102/sn9c102_core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/media/sn9c102/sn9c102_core.c b/drivers/staging/media/sn9c102/sn9c102_core.c index 2cb44de2b92c..7be25b0ffae6 100644 --- a/drivers/staging/media/sn9c102/sn9c102_core.c +++ b/drivers/staging/media/sn9c102/sn9c102_core.c @@ -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; |
