Skip to content

Commit

Permalink
usb: renesas_usbhs: mod_host: don't print on ENOMEM
Browse files Browse the repository at this point in the history
All kmalloc-based functions print enough information on failures.

Signed-off-by: Wolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
  • Loading branch information
Wolfram Sang authored and Felipe Balbi committed Aug 29, 2016
1 parent cb73db7 commit 2218491
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/usb/renesas_usbhs/mod_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,10 @@ static struct usbhsh_request *usbhsh_ureq_alloc(struct usbhsh_hpriv *hpriv,
gfp_t mem_flags)
{
struct usbhsh_request *ureq;
struct usbhs_priv *priv = usbhsh_hpriv_to_priv(hpriv);
struct device *dev = usbhs_priv_to_dev(priv);

ureq = kzalloc(sizeof(struct usbhsh_request), mem_flags);
if (!ureq) {
dev_err(dev, "ureq alloc fail\n");
if (!ureq)
return NULL;
}

usbhs_pkt_init(&ureq->pkt);
ureq->urb = urb;
Expand Down Expand Up @@ -388,10 +384,8 @@ static int usbhsh_endpoint_attach(struct usbhsh_hpriv *hpriv,
unsigned long flags;

uep = kzalloc(sizeof(struct usbhsh_ep), mem_flags);
if (!uep) {
dev_err(dev, "usbhsh_ep alloc fail\n");
if (!uep)
return -ENOMEM;
}

/******************** spin lock ********************/
usbhs_lock(priv, flags);
Expand Down

0 comments on commit 2218491

Please sign in to comment.