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>
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;
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;