From: Tülin İzer Date: Fri, 17 May 2013 07:13:58 +0000 (+0300) Subject: usb: devio: Fixed error: 'do not use assignment in if condition' X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4baf0df7010e8d975edcd778604fc1b1fce30f37;p=linux-beck.git usb: devio: Fixed error: 'do not use assignment in if condition' This patch fixes error: 'do not use assignment in if condition' in USB/devio.c. Signed-off-by: Tülin İzer Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index 009bc3f2fde4..47ff9b1c8a37 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -1800,7 +1800,8 @@ static int proc_ioctl(struct dev_state *ps, struct usbdevfs_ioctl *ctl) /* alloc buffer */ if ((size = _IOC_SIZE(ctl->ioctl_code)) > 0) { - if ((buf = kmalloc(size, GFP_KERNEL)) == NULL) + buf = kmalloc(size, GFP_KERNEL); + if (buf == NULL) return -ENOMEM; if ((_IOC_DIR(ctl->ioctl_code) & _IOC_WRITE)) { if (copy_from_user(buf, ctl->data, size)) {