aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/gadget.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2014-07-16 23:45:11 -0400
committerFelipe Balbi <balbi@ti.com>2014-08-20 13:14:45 -0400
commit734d5a5393ed8eedf70f13c7078cb4a6134f49f2 (patch)
tree3f29e6582a614aa61aaa8622bc7726a387b26760 /drivers/usb/dwc3/gadget.c
parent7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (diff)
usb: dwc3: remove unnecessary OOM messages
The site-specific OOM messages are unnecessary, because they duplicate the MM subsystem generic OOM message. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/dwc3/gadget.c')
-rw-r--r--drivers/usb/dwc3/gadget.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 349cacc577d8..307b5139faf3 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -789,13 +789,10 @@ static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep,
789{ 789{
790 struct dwc3_request *req; 790 struct dwc3_request *req;
791 struct dwc3_ep *dep = to_dwc3_ep(ep); 791 struct dwc3_ep *dep = to_dwc3_ep(ep);
792 struct dwc3 *dwc = dep->dwc;
793 792
794 req = kzalloc(sizeof(*req), gfp_flags); 793 req = kzalloc(sizeof(*req), gfp_flags);
795 if (!req) { 794 if (!req)
796 dev_err(dwc->dev, "not enough memory\n");
797 return NULL; 795 return NULL;
798 }
799 796
800 req->epnum = dep->number; 797 req->epnum = dep->number;
801 req->dep = dep; 798 req->dep = dep;
@@ -1743,11 +1740,8 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,
1743 u8 epnum = (i << 1) | (!!direction); 1740 u8 epnum = (i << 1) | (!!direction);
1744 1741
1745 dep = kzalloc(sizeof(*dep), GFP_KERNEL); 1742 dep = kzalloc(sizeof(*dep), GFP_KERNEL);
1746 if (!dep) { 1743 if (!dep)
1747 dev_err(dwc->dev, "can't allocate endpoint %d\n",
1748 epnum);
1749 return -ENOMEM; 1744 return -ENOMEM;
1750 }
1751 1745
1752 dep->dwc = dwc; 1746 dep->dwc = dwc;
1753 dep->number = epnum; 1747 dep->number = epnum;
@@ -2759,7 +2753,6 @@ int dwc3_gadget_init(struct dwc3 *dwc)
2759 2753
2760 dwc->setup_buf = kzalloc(DWC3_EP0_BOUNCE_SIZE, GFP_KERNEL); 2754 dwc->setup_buf = kzalloc(DWC3_EP0_BOUNCE_SIZE, GFP_KERNEL);
2761 if (!dwc->setup_buf) { 2755 if (!dwc->setup_buf) {
2762 dev_err(dwc->dev, "failed to allocate setup buffer\n");
2763 ret = -ENOMEM; 2756 ret = -ENOMEM;
2764 goto err2; 2757 goto err2;
2765 } 2758 }