projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa86ad0
)
usb: devio: Fixed error: 'do not use assignment in if condition'
author
Tülin İzer
<tulinizer@gmail.com>
Fri, 17 May 2013 07:13:58 +0000
(10:13 +0300)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Fri, 17 May 2013 17:05:57 +0000
(10:05 -0700)
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>
drivers/usb/core/devio.c
patch
|
blob
|
history
diff --git
a/drivers/usb/core/devio.c
b/drivers/usb/core/devio.c
index 009bc3f2fde437415123f607c057a6f422f31eb7..47ff9b1c8a371dea50e2952f047c12f407c357fa 100644
(file)
--- 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)) {