Skip to content

Commit

Permalink
can: at91_can: at91_open(): forward request_irq()'s return value in c…
Browse files Browse the repository at this point in the history
…ase or an error

If request_irq() fails, forward the return value.

Link: https://lore.kernel.org/all/[email protected]
Signed-off-by: Marc Kleine-Budde <[email protected]>
  • Loading branch information
marckleinebudde committed Oct 5, 2023
1 parent 8227088 commit 99f4ff4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/can/at91_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 99f4ff4

Please sign in to comment.