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>
This commit is contained in:
Родитель
fa86ad0b63
Коммит
4baf0df701
|
@ -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)) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче