diff mbox series

can: ctucanfd: Remove unnecessary print function dev_err()

Message ID 20220421203242.7335-1-jiapeng.chong@linux.alibaba.com (mailing list archive)
State Awaiting Upstream
Delegated to: Netdev Maintainers
Headers show
Series can: ctucanfd: Remove unnecessary print function dev_err() | expand

Checks

Context Check Description
netdev/tree_selection success Series ignored based on subject

Commit Message

Jiapeng Chong April 21, 2022, 8:32 p.m. UTC
The print function dev_err() is redundant because platform_get_irq()
already prints an error.

Eliminate the follow coccicheck warnings:

./drivers/net/can/ctucanfd/ctucanfd_platform.c:67:2-9: line 67 is
redundant because platform_get_irq() already prints an error.

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
---
 drivers/net/can/ctucanfd/ctucanfd_platform.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Pavel Pisa April 21, 2022, 9:16 p.m. UTC | #1
Thanks for checking

On Thursday 21 of April 2022 22:32:42 Jiapeng Chong wrote:
> The print function dev_err() is redundant because platform_get_irq()
> already prints an error.
>
> Eliminate the follow coccicheck warnings:
>
> ./drivers/net/can/ctucanfd/ctucanfd_platform.c:67:2-9: line 67 is
> redundant because platform_get_irq() already prints an error.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Acked-by: Pave Pisa <pisa@cmp.felk.cvut.cz>

>  drivers/net/can/ctucanfd/ctucanfd_platform.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c
> b/drivers/net/can/ctucanfd/ctucanfd_platform.c index
> 5e4806068662..89d54c2151e1 100644
> --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
> +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
> @@ -64,7 +64,6 @@ static int ctucan_platform_probe(struct platform_device
> *pdev) }
>  	irq = platform_get_irq(pdev, 0);
>  	if (irq < 0) {
> -		dev_err(dev, "Cannot find interrupt.\n");
>  		ret = irq;
>  		goto err;
>  	}
diff mbox series

Patch

diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c
index 5e4806068662..89d54c2151e1 100644
--- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
+++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
@@ -64,7 +64,6 @@  static int ctucan_platform_probe(struct platform_device *pdev)
 	}
 	irq = platform_get_irq(pdev, 0);
 	if (irq < 0) {
-		dev_err(dev, "Cannot find interrupt.\n");
 		ret = irq;
 		goto err;
 	}