diff mbox series

usb: gadget: Remove unnecessary print function dev_err()

Message ID 20220616090410.128483-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State New, archived
Headers show
Series usb: gadget: Remove unnecessary print function dev_err() | expand

Commit Message

Jiapeng Chong June 16, 2022, 9:04 a.m. UTC
The print function dev_err() is redundant because platform_get_irq()
already prints an error.

This was found by coccicheck:

./drivers/usb/gadget/udc/aspeed_udc.c:1546:2-9: line 1546 is redundant because platform_get_irq() already prints an error.

Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/usb/gadget/udc/aspeed_udc.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Neal Liu June 16, 2022, 10:16 a.m. UTC | #1
> The print function dev_err() is redundant because platform_get_irq() already
> prints an error.
> 
> This was found by coccicheck:
> 
> ./drivers/usb/gadget/udc/aspeed_udc.c:1546:2-9: line 1546 is redundant
> because platform_get_irq() already prints an error.
> 
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Neal Liu <neal_liu@aspeedtech.com>

> ---
>  drivers/usb/gadget/udc/aspeed_udc.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/aspeed_udc.c
> b/drivers/usb/gadget/udc/aspeed_udc.c
> index 1fc15228ff15..2c3dc80d6b8c 100644
> --- a/drivers/usb/gadget/udc/aspeed_udc.c
> +++ b/drivers/usb/gadget/udc/aspeed_udc.c
> @@ -1543,7 +1543,6 @@ static int ast_udc_probe(struct platform_device
> *pdev)
>  	/* Find interrupt and install handler */
>  	udc->irq = platform_get_irq(pdev, 0);
>  	if (udc->irq < 0) {
> -		dev_err(&pdev->dev, "Failed to get interrupt\n");
>  		rc = udc->irq;
>  		goto err;
>  	}
> --
> 2.20.1.7.g153144c
diff mbox series

Patch

diff --git a/drivers/usb/gadget/udc/aspeed_udc.c b/drivers/usb/gadget/udc/aspeed_udc.c
index 1fc15228ff15..2c3dc80d6b8c 100644
--- a/drivers/usb/gadget/udc/aspeed_udc.c
+++ b/drivers/usb/gadget/udc/aspeed_udc.c
@@ -1543,7 +1543,6 @@  static int ast_udc_probe(struct platform_device *pdev)
 	/* Find interrupt and install handler */
 	udc->irq = platform_get_irq(pdev, 0);
 	if (udc->irq < 0) {
-		dev_err(&pdev->dev, "Failed to get interrupt\n");
 		rc = udc->irq;
 		goto err;
 	}