diff options
Diffstat (limited to 'drivers/usb/core/devio.c')
| -rw-r--r-- | drivers/usb/core/devio.c | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index c88c4fb9459d..05986507b585 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -49,14 +49,14 @@  #include <linux/security.h>  #include <linux/user_namespace.h>  #include <linux/scatterlist.h> -#include <asm/uaccess.h> +#include <linux/uaccess.h>  #include <asm/byteorder.h>  #include <linux/moduleparam.h>  #include "usb.h"  #define USB_MAXBUS			64 -#define USB_DEVICE_MAX			USB_MAXBUS * 128 +#define USB_DEVICE_MAX			(USB_MAXBUS * 128)  #define USB_SG_SIZE			16384 /* split-size for large txs */  /* Mutual exclusion for removal, open, and release */ @@ -1804,7 +1804,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)) { |