From 4baf0df7010e8d975edcd778604fc1b1fce30f37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?T=C3=BClin=20=C4=B0zer?= Date: Fri, 17 May 2013 10:13:58 +0300 Subject: [PATCH] usb: devio: Fixed error: 'do not use assignment in if condition' MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- drivers/usb/core/devio.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)) { -- GitLab