diff options
author | Tang Bin <tangbin@cmss.chinamobile.com> | 2020-09-28 15:00:51 +0300 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-10-02 09:57:46 +0300 |
commit | a73abc28ce67989ebf881f33961d9dec9c7522b9 (patch) | |
tree | 28bea41c3d3b7dfdb1895150e34a7090fadaddea /drivers/usb/gadget | |
parent | ae7e86108b12351028fa7e8796a59f9b2d9e1774 (diff) | |
download | linux-a73abc28ce67989ebf881f33961d9dec9c7522b9.tar.xz |
usb: bdc: remove duplicated error message
in case devm_platform_ioremap_resource() fails, that function already
prints a relevant error message which renders the driver's dev_err()
redundant. Let's remove the unnecessary message and, while at that,
also make sure to pass along the error value returned by
devm_platform_ioremap_resource() instead of always returning -ENOMEM.
Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
[balbi@kernel.org : improved commit log]
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/udc/bdc/bdc_core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c index 96e1fca63b63..0bef6b3f049b 100644 --- a/drivers/usb/gadget/udc/bdc/bdc_core.c +++ b/drivers/usb/gadget/udc/bdc/bdc_core.c @@ -510,10 +510,9 @@ static int bdc_probe(struct platform_device *pdev) bdc->clk = clk; bdc->regs = devm_platform_ioremap_resource(pdev, 0); - if (IS_ERR(bdc->regs)) { - dev_err(dev, "ioremap error\n"); - return -ENOMEM; - } + if (IS_ERR(bdc->regs)) + return PTR_ERR(bdc->regs); + irq = platform_get_irq(pdev, 0); if (irq < 0) return irq; |