summaryrefslogtreecommitdiff
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2023-05-01 19:14:41 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2023-10-05 22:46:38 +0300
commit99f4ff41bbb0a22b3c4bf800b060833255f6ae2a (patch)
treebeb24b40208c784aeee1d73571c7f06971ef51ad /drivers/net/can
parent8227088cb3c2afb58a45a946d92f6bf93d04d6de (diff)
downloadlinux-99f4ff41bbb0a22b3c4bf800b060833255f6ae2a.tar.xz
can: at91_can: at91_open(): forward request_irq()'s return value in case or an error
If request_irq() fails, forward the return value. Link: https://lore.kernel.org/all/20231005-at91_can-rx_offload-v2-15-9987d53600e0@pengutronix.de Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-rw-r--r--drivers/net/can/at91_can.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/can/at91_can.c b/drivers/net/can/at91_can.c
index 3f3c6f2107a8..bfe414581fa1 100644
--- a/drivers/net/can/at91_can.c
+++ b/drivers/net/can/at91_can.c
@@ -1128,11 +1128,10 @@ static int at91_open(struct net_device *dev)
goto out;
/* register interrupt handler */
- if (request_irq(dev->irq, at91_irq, IRQF_SHARED,
- dev->name, dev)) {
- err = -EAGAIN;
+ err = request_irq(dev->irq, at91_irq, IRQF_SHARED,
+ dev->name, dev);
+ if (err)
goto out_close;
- }
/* start chip and queuing */
at91_chip_start(dev);