diff options
author | Jingoo Han <jg1.han@samsung.com> | 2014-07-16 23:45:11 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-08-20 13:14:45 -0400 |
commit | 734d5a5393ed8eedf70f13c7078cb4a6134f49f2 (patch) | |
tree | 3f29e6582a614aa61aaa8622bc7726a387b26760 | |
parent | 7d1311b93e58ed55f3a31cc8f94c4b8fe988a2b9 (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>
-rw-r--r-- | drivers/usb/dwc3/core.c | 9 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-exynos.c | 4 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/dwc3/dwc3-pci.c | 4 | ||||
-rw-r--r-- | drivers/usb/dwc3/gadget.c | 11 |
5 files changed, 8 insertions, 24 deletions
diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c index b769c1faaf03..f2050e844b4b 100644 --- a/drivers/usb/dwc3/core.c +++ b/drivers/usb/dwc3/core.c | |||
@@ -186,10 +186,8 @@ static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length) | |||
186 | 186 | ||
187 | dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs) * num, | 187 | dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs) * num, |
188 | GFP_KERNEL); | 188 | GFP_KERNEL); |
189 | if (!dwc->ev_buffs) { | 189 | if (!dwc->ev_buffs) |
190 | dev_err(dwc->dev, "can't allocate event buffers array\n"); | ||
191 | return -ENOMEM; | 190 | return -ENOMEM; |
192 | } | ||
193 | 191 | ||
194 | for (i = 0; i < num; i++) { | 192 | for (i = 0; i < num; i++) { |
195 | struct dwc3_event_buffer *evt; | 193 | struct dwc3_event_buffer *evt; |
@@ -639,10 +637,9 @@ static int dwc3_probe(struct platform_device *pdev) | |||
639 | void *mem; | 637 | void *mem; |
640 | 638 | ||
641 | mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); | 639 | mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); |
642 | if (!mem) { | 640 | if (!mem) |
643 | dev_err(dev, "not enough memory\n"); | ||
644 | return -ENOMEM; | 641 | return -ENOMEM; |
645 | } | 642 | |
646 | dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); | 643 | dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1); |
647 | dwc->mem = mem; | 644 | dwc->mem = mem; |
648 | dwc->dev = dev; | 645 | dwc->dev = dev; |
diff --git a/drivers/usb/dwc3/dwc3-exynos.c b/drivers/usb/dwc3/dwc3-exynos.c index f9fb8adb785b..3951a65fea04 100644 --- a/drivers/usb/dwc3/dwc3-exynos.c +++ b/drivers/usb/dwc3/dwc3-exynos.c | |||
@@ -113,10 +113,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev) | |||
113 | int ret; | 113 | int ret; |
114 | 114 | ||
115 | exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL); | 115 | exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL); |
116 | if (!exynos) { | 116 | if (!exynos) |
117 | dev_err(dev, "not enough memory\n"); | ||
118 | return -ENOMEM; | 117 | return -ENOMEM; |
119 | } | ||
120 | 118 | ||
121 | /* | 119 | /* |
122 | * Right now device-tree probed devices don't get dma_mask set. | 120 | * Right now device-tree probed devices don't get dma_mask set. |
diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index ef4936ff626c..76345aceb4b6 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c | |||
@@ -481,10 +481,8 @@ static int dwc3_omap_probe(struct platform_device *pdev) | |||
481 | } | 481 | } |
482 | 482 | ||
483 | omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL); | 483 | omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL); |
484 | if (!omap) { | 484 | if (!omap) |
485 | dev_err(dev, "not enough memory\n"); | ||
486 | return -ENOMEM; | 485 | return -ENOMEM; |
487 | } | ||
488 | 486 | ||
489 | platform_set_drvdata(pdev, omap); | 487 | platform_set_drvdata(pdev, omap); |
490 | 488 | ||
diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c index a60bab7dfa0a..436fb08c40b8 100644 --- a/drivers/usb/dwc3/dwc3-pci.c +++ b/drivers/usb/dwc3/dwc3-pci.c | |||
@@ -103,10 +103,8 @@ static int dwc3_pci_probe(struct pci_dev *pci, | |||
103 | struct device *dev = &pci->dev; | 103 | struct device *dev = &pci->dev; |
104 | 104 | ||
105 | glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL); | 105 | glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL); |
106 | if (!glue) { | 106 | if (!glue) |
107 | dev_err(dev, "not enough memory\n"); | ||
108 | return -ENOMEM; | 107 | return -ENOMEM; |
109 | } | ||
110 | 108 | ||
111 | glue->dev = dev; | 109 | glue->dev = dev; |
112 | 110 | ||
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 | } |