Commit b8246caf authored by Wolfram Sang's avatar Wolfram Sang Committed by Felipe Balbi

usb: gadget: udc: fsl_qe_udc: don't print on ENOMEM

All kmalloc-based functions print enough information on failures.
Signed-off-by: default avatarWolfram Sang <wsa-dev@sang-engineering.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 8bae0f8c
...@@ -421,10 +421,8 @@ static int qe_ep_rxbd_update(struct qe_ep *ep) ...@@ -421,10 +421,8 @@ static int qe_ep_rxbd_update(struct qe_ep *ep)
bd = ep->rxbase; bd = ep->rxbase;
ep->rxframe = kmalloc(sizeof(*ep->rxframe), GFP_ATOMIC); ep->rxframe = kmalloc(sizeof(*ep->rxframe), GFP_ATOMIC);
if (ep->rxframe == NULL) { if (!ep->rxframe)
dev_err(ep->udc->dev, "malloc rxframe failed\n");
return -ENOMEM; return -ENOMEM;
}
qe_frame_init(ep->rxframe); qe_frame_init(ep->rxframe);
...@@ -435,9 +433,7 @@ static int qe_ep_rxbd_update(struct qe_ep *ep) ...@@ -435,9 +433,7 @@ static int qe_ep_rxbd_update(struct qe_ep *ep)
size = (ep->ep.maxpacket + USB_CRC_SIZE + 2) * (bdring_len + 1); size = (ep->ep.maxpacket + USB_CRC_SIZE + 2) * (bdring_len + 1);
ep->rxbuffer = kzalloc(size, GFP_ATOMIC); ep->rxbuffer = kzalloc(size, GFP_ATOMIC);
if (ep->rxbuffer == NULL) { if (!ep->rxbuffer) {
dev_err(ep->udc->dev, "malloc rxbuffer failed,size=%d\n",
size);
kfree(ep->rxframe); kfree(ep->rxframe);
return -ENOMEM; return -ENOMEM;
} }
...@@ -668,10 +664,8 @@ static int qe_ep_init(struct qe_udc *udc, ...@@ -668,10 +664,8 @@ static int qe_ep_init(struct qe_udc *udc,
if ((ep->tm == USBP_TM_CTL) || (ep->dir == USB_DIR_IN)) { if ((ep->tm == USBP_TM_CTL) || (ep->dir == USB_DIR_IN)) {
ep->txframe = kmalloc(sizeof(*ep->txframe), GFP_ATOMIC); ep->txframe = kmalloc(sizeof(*ep->txframe), GFP_ATOMIC);
if (ep->txframe == NULL) { if (!ep->txframe)
dev_err(udc->dev, "malloc txframe failed\n");
goto en_done2; goto en_done2;
}
qe_frame_init(ep->txframe); qe_frame_init(ep->txframe);
} }
...@@ -2347,10 +2341,8 @@ static struct qe_udc *qe_udc_config(struct platform_device *ofdev) ...@@ -2347,10 +2341,8 @@ static struct qe_udc *qe_udc_config(struct platform_device *ofdev)
u32 offset; u32 offset;
udc = kzalloc(sizeof(*udc), GFP_KERNEL); udc = kzalloc(sizeof(*udc), GFP_KERNEL);
if (udc == NULL) { if (!udc)
dev_err(&ofdev->dev, "malloc udc failed\n");
goto cleanup; goto cleanup;
}
udc->dev = &ofdev->dev; udc->dev = &ofdev->dev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment