summaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorTülin İzer <tulinizer@gmail.com>2013-05-17 10:13:58 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-17 10:05:57 -0700
commit4baf0df7010e8d975edcd778604fc1b1fce30f37 (patch)
treeffb9fad6761148b33d09b2d55143f971ca8e6f92 /drivers/usb/core
parentfa86ad0b63846d35b6989cefe24e46301b94a9f3 (diff)
downloadop-kernel-dev-4baf0df7010e8d975edcd778604fc1b1fce30f37.zip
op-kernel-dev-4baf0df7010e8d975edcd778604fc1b1fce30f37.tar.gz
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 <tulinizer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-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 009bc3f..47ff9b1 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)) {
OpenPOWER on IntegriCloud