diff options
Diffstat (limited to 'drivers/usb/core/hcd.c')
| -rw-r--r-- | drivers/usb/core/hcd.c | 6 | 
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index faeaace0d197..8300baedafd2 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -3133,8 +3133,12 @@ int usb_hcd_setup_local_mem(struct usb_hcd *hcd, phys_addr_t phys_addr,  					     GFP_KERNEL,  					     DMA_ATTR_WRITE_COMBINE); -	if (IS_ERR(local_mem)) +	if (IS_ERR_OR_NULL(local_mem)) { +		if (!local_mem) +			return -ENOMEM; +  		return PTR_ERR(local_mem); +	}  	/*  	 * Here we pass a dma_addr_t but the arg type is a phys_addr_t.  |