]> git.karo-electronics.de Git - linux-beck.git/commitdiff
usb: devio: Fixed error: 'do not use assignment in if condition'
authorTülin İzer <tulinizer@gmail.com>
Fri, 17 May 2013 07:13:58 +0000 (10:13 +0300)
committerGreg 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

index 009bc3f2fde437415123f607c057a6f422f31eb7..47ff9b1c8a371dea50e2952f047c12f407c357fa 100644 (file)
@@ -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)) {