can: bxcan: Remove unnecessary print function dev_err()
Subsystems (4)
PATCH 1/1 can: bxcan: Remove unnecessary print function dev_err()
The print function dev_err() is redundant because platform_get_irq_byname() already prints an error.
./drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because platform_get_irq() already prints an error. ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant because platform_get_irq() already prints an error. ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant because platform_get_irq() already prints an error.
--- drivers/net/can/bxcan.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
drivers/net/can/bxcan.c +3 -9
@@ -954,22 +954,16 @@ static int bxcan_probe(struct platform_device *pdev) } rx_irq =platform_get_irq_byname (pdev,"rx0" ); -if (rx_irq <0 ) { -dev_err (dev,"failed to get rx0 irq\n" ); +if (rx_irq <0 )return rx_irq; - } tx_irq =platform_get_irq_byname (pdev,"tx" ); -if (tx_irq <0 ) { -dev_err (dev,"failed to get tx irq\n" ); +if (tx_irq <0 )return tx_irq; - } sce_irq =platform_get_irq_byname (pdev,"sce" ); -if (sce_irq <0 ) { -dev_err (dev,"failed to get sce irq\n" ); +if (sce_irq <0 )return sce_irq; - } ndev =alloc_candev (sizeof (struct bxcan_priv ),BXCAN_TX_MB_NUM );if (!ndev) {
Signature · 1 line
2.20.1.7.g153144c
Quoted 10 lines · Jiapeng Chong
The print function
dev_err()is redundant becauseplatform_get_irq_byname()already prints an error../drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because
platform_get_irq()already prints an error. ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant becauseplatform_get_irq()already prints an error. ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant becauseplatform_get_irq()already prints an error.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>
Quoted 10 lines · Jiapeng Chong
The print function
dev_err()is redundant becauseplatform_get_irq_byname()already prints an error../drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because
platform_get_irq()already prints an error. ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant becauseplatform_get_irq()already prints an error. ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant becauseplatform_get_irq()already prints an error.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>
Applied to linux-can-next
Thanks,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung Nürnberg | Phone: +49-5121-206917-129 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |