Commit a73abc28 authored by Tang Bin's avatar Tang Bin Committed by Felipe Balbi

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: default avatarZhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: default avatarTang Bin <tangbin@cmss.chinamobile.com>

[balbi@kernel.org : improved commit log]
Signed-off-by: default avatarFelipe Balbi <balbi@kernel.org>
parent ae7e8610
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment