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>
This commit is contained in:
@@ -186,10 +186,8 @@ static int dwc3_alloc_event_buffers(struct dwc3 *dwc, unsigned length)
|
|||||||
|
|
||||||
dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs) * num,
|
dwc->ev_buffs = devm_kzalloc(dwc->dev, sizeof(*dwc->ev_buffs) * num,
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
if (!dwc->ev_buffs) {
|
if (!dwc->ev_buffs)
|
||||||
dev_err(dwc->dev, "can't allocate event buffers array\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
for (i = 0; i < num; i++) {
|
for (i = 0; i < num; i++) {
|
||||||
struct dwc3_event_buffer *evt;
|
struct dwc3_event_buffer *evt;
|
||||||
@@ -639,10 +637,9 @@ static int dwc3_probe(struct platform_device *pdev)
|
|||||||
void *mem;
|
void *mem;
|
||||||
|
|
||||||
mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
|
mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL);
|
||||||
if (!mem) {
|
if (!mem)
|
||||||
dev_err(dev, "not enough memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1);
|
dwc = PTR_ALIGN(mem, DWC3_ALIGN_MASK + 1);
|
||||||
dwc->mem = mem;
|
dwc->mem = mem;
|
||||||
dwc->dev = dev;
|
dwc->dev = dev;
|
||||||
|
|||||||
@@ -113,10 +113,8 @@ static int dwc3_exynos_probe(struct platform_device *pdev)
|
|||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL);
|
exynos = devm_kzalloc(dev, sizeof(*exynos), GFP_KERNEL);
|
||||||
if (!exynos) {
|
if (!exynos)
|
||||||
dev_err(dev, "not enough memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Right now device-tree probed devices don't get dma_mask set.
|
* Right now device-tree probed devices don't get dma_mask set.
|
||||||
|
|||||||
@@ -481,10 +481,8 @@ static int dwc3_omap_probe(struct platform_device *pdev)
|
|||||||
}
|
}
|
||||||
|
|
||||||
omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
|
omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL);
|
||||||
if (!omap) {
|
if (!omap)
|
||||||
dev_err(dev, "not enough memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
platform_set_drvdata(pdev, omap);
|
platform_set_drvdata(pdev, omap);
|
||||||
|
|
||||||
|
|||||||
@@ -103,10 +103,8 @@ static int dwc3_pci_probe(struct pci_dev *pci,
|
|||||||
struct device *dev = &pci->dev;
|
struct device *dev = &pci->dev;
|
||||||
|
|
||||||
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
|
glue = devm_kzalloc(dev, sizeof(*glue), GFP_KERNEL);
|
||||||
if (!glue) {
|
if (!glue)
|
||||||
dev_err(dev, "not enough memory\n");
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
glue->dev = dev;
|
glue->dev = dev;
|
||||||
|
|
||||||
|
|||||||
@@ -789,13 +789,10 @@ static struct usb_request *dwc3_gadget_ep_alloc_request(struct usb_ep *ep,
|
|||||||
{
|
{
|
||||||
struct dwc3_request *req;
|
struct dwc3_request *req;
|
||||||
struct dwc3_ep *dep = to_dwc3_ep(ep);
|
struct dwc3_ep *dep = to_dwc3_ep(ep);
|
||||||
struct dwc3 *dwc = dep->dwc;
|
|
||||||
|
|
||||||
req = kzalloc(sizeof(*req), gfp_flags);
|
req = kzalloc(sizeof(*req), gfp_flags);
|
||||||
if (!req) {
|
if (!req)
|
||||||
dev_err(dwc->dev, "not enough memory\n");
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
|
||||||
|
|
||||||
req->epnum = dep->number;
|
req->epnum = dep->number;
|
||||||
req->dep = dep;
|
req->dep = dep;
|
||||||
@@ -1743,11 +1740,8 @@ static int dwc3_gadget_init_hw_endpoints(struct dwc3 *dwc,
|
|||||||
u8 epnum = (i << 1) | (!!direction);
|
u8 epnum = (i << 1) | (!!direction);
|
||||||
|
|
||||||
dep = kzalloc(sizeof(*dep), GFP_KERNEL);
|
dep = kzalloc(sizeof(*dep), GFP_KERNEL);
|
||||||
if (!dep) {
|
if (!dep)
|
||||||
dev_err(dwc->dev, "can't allocate endpoint %d\n",
|
|
||||||
epnum);
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
}
|
|
||||||
|
|
||||||
dep->dwc = dwc;
|
dep->dwc = dwc;
|
||||||
dep->number = epnum;
|
dep->number = epnum;
|
||||||
@@ -2759,7 +2753,6 @@ int dwc3_gadget_init(struct dwc3 *dwc)
|
|||||||
|
|
||||||
dwc->setup_buf = kzalloc(DWC3_EP0_BOUNCE_SIZE, GFP_KERNEL);
|
dwc->setup_buf = kzalloc(DWC3_EP0_BOUNCE_SIZE, GFP_KERNEL);
|
||||||
if (!dwc->setup_buf) {
|
if (!dwc->setup_buf) {
|
||||||
dev_err(dwc->dev, "failed to allocate setup buffer\n");
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user