From b3ab5c4219c2d57ed1911a5fd3699fae1196e047 Mon Sep 17 00:00:00 2001 From: Himangi Saraogi Date: Sun, 2 Mar 2014 02:18:38 +0530 Subject: [PATCH] upstream: 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 Acked-by: Paul E. McKenney Signed-off-by: Greg Kroah-Hartman --- drivers/media/usb/sn9c102/sn9c102_core.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/media/usb/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c index 2cb44de..7be25b0 100644 --- a/drivers/media/usb/sn9c102/sn9c102_core.c +++ b/drivers/media/usb/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; -- 2.7.4