Skip to content

Commit cca7d85

Browse files
wb-zjp846396marckleinebudde
authored andcommitted
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. Reported-by: Abaci Robot <abaci@linux.alibaba.com> Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4878 Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Simon Horman <simon.horman@corigine.com> Link: https://lore.kernel.org/all/20230506080725.68401-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 88da174 commit cca7d85

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

drivers/net/can/bxcan.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -954,22 +954,16 @@ static int bxcan_probe(struct platform_device *pdev)
954954
}
955955

956956
rx_irq = platform_get_irq_byname(pdev, "rx0");
957-
if (rx_irq < 0) {
958-
dev_err(dev, "failed to get rx0 irq\n");
957+
if (rx_irq < 0)
959958
return rx_irq;
960-
}
961959

962960
tx_irq = platform_get_irq_byname(pdev, "tx");
963-
if (tx_irq < 0) {
964-
dev_err(dev, "failed to get tx irq\n");
961+
if (tx_irq < 0)
965962
return tx_irq;
966-
}
967963

968964
sce_irq = platform_get_irq_byname(pdev, "sce");
969-
if (sce_irq < 0) {
970-
dev_err(dev, "failed to get sce irq\n");
965+
if (sce_irq < 0)
971966
return sce_irq;
972-
}
973967

974968
ndev = alloc_candev(sizeof(struct bxcan_priv), BXCAN_TX_MB_NUM);
975969
if (!ndev) {

0 commit comments

Comments
 (0)