diff options
author | Tülin İzer <tulinizer@gmail.com> | 2013-05-17 10:13:58 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-17 10:05:57 -0700 |
commit | 4baf0df7010e8d975edcd778604fc1b1fce30f37 (patch) | |
tree | ffb9fad6761148b33d09b2d55143f971ca8e6f92 /drivers/usb/core/devio.c | |
parent | fa86ad0b63846d35b6989cefe24e46301b94a9f3 (diff) | |
download | lwn-4baf0df7010e8d975edcd778604fc1b1fce30f37.tar.gz lwn-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 <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core/devio.c')
-rw-r--r-- | drivers/usb/core/devio.c | 3 |
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)) { |