aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/devio.c
diff options
context:
space:
mode:
authorTülin İzer <[email protected]>2013-05-17 07:13:58 +0000
committerGreg Kroah-Hartman <[email protected]>2013-05-17 17:05:57 +0000
commit4baf0df7010e8d975edcd778604fc1b1fce30f37 (patch)
treeffb9fad6761148b33d09b2d55143f971ca8e6f92 /drivers/usb/core/devio.c
parentusb: devio: Fixed macro parenthesis error (diff)
downloadkernel-4baf0df7010e8d975edcd778604fc1b1fce30f37.tar.gz
kernel-4baf0df7010e8d975edcd778604fc1b1fce30f37.zip
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r--drivers/usb/core/devio.c3
1 files changed, 2 insertions, 1 deletions
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)) {