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>
This commit is contained in:
Tang Bin 2020-09-28 20:00:51 +08:00 коммит произвёл Felipe Balbi
Родитель ae7e86108b
Коммит a73abc28ce
1 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -510,10 +510,9 @@ static int bdc_probe(struct platform_device *pdev)
bdc->clk = clk; bdc->clk = clk;
bdc->regs = devm_platform_ioremap_resource(pdev, 0); bdc->regs = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(bdc->regs)) { if (IS_ERR(bdc->regs))
dev_err(dev, "ioremap error\n"); return PTR_ERR(bdc->regs);
return -ENOMEM;
}
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (irq < 0) if (irq < 0)
return irq; return irq;