usb: renesas_usbhs: mod_host: don't print on ENOMEM
authorWolfram Sang <wsa-dev@sang-engineering.com>
Thu, 25 Aug 2016 17:39:29 +0000 (19:39 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Mon, 29 Aug 2016 07:48:20 +0000 (10:48 +0300)
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>
drivers/usb/renesas_usbhs/mod_host.c

index 3bf0b72eb359f192422fca689159b2b71669dcdc..165e81bfd93a6632457dc0a278036f70f2a9ed05 100644 (file)
@@ -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;
@@ -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);