linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: bdc: Remove duplicate error message in bdc_probe()
@ 2020-09-27 13:42 Tang Bin
  2020-09-27 13:45 ` Greg KH
  2020-09-28  6:49 ` Chunfeng Yun
  0 siblings, 2 replies; 9+ messages in thread
From: Tang Bin @ 2020-09-27 13:42 UTC (permalink / raw)
  To: balbi, gregkh; +Cc: linux-usb, linux-kernel, Tang Bin, Zhang Shengju

In this function, we don't need dev_err() message because
when something goes wrong, devm_platform_ioremap_resource()
can print an error message itself, so remove the redundant
one.

Signed-off-by: Zhang Shengju <zhangshengju@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/usb/gadget/udc/bdc/bdc_core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/bdc/bdc_core.c b/drivers/usb/gadget/udc/bdc/bdc_core.c
index 02a3a7746..9454f179e 100644
--- a/drivers/usb/gadget/udc/bdc/bdc_core.c
+++ b/drivers/usb/gadget/udc/bdc/bdc_core.c
@@ -508,10 +508,8 @@ 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");
+	if (IS_ERR(bdc->regs))
 		return -ENOMEM;
-	}
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0)
 		return irq;
-- 
2.20.1.windows.1




^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-09-28 11:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-27 13:42 [PATCH] usb: bdc: Remove duplicate error message in bdc_probe() Tang Bin
2020-09-27 13:45 ` Greg KH
2020-09-28  8:45   ` Tang Bin
2020-09-28  9:40     ` Felipe Balbi
2020-09-28 10:55       ` Tang Bin
2020-09-28 11:23         ` Greg KH
2020-09-28 11:31           ` Tang Bin
2020-09-28  6:49 ` Chunfeng Yun
2020-09-28  8:40   ` Tang Bin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).