Commit f8d17b6f authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Greg Kroah-Hartman

can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails

commit 7e9e148a upstream.

If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed,
this patch adds the missing cleanup.
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5e764c59
...@@ -805,7 +805,7 @@ static int flexcan_open(struct net_device *dev) ...@@ -805,7 +805,7 @@ static int flexcan_open(struct net_device *dev)
err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev); err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev);
if (err) if (err)
goto out_close; goto out_free_irq;
/* start chip and queuing */ /* start chip and queuing */
err = flexcan_chip_start(dev); err = flexcan_chip_start(dev);
...@@ -816,6 +816,8 @@ static int flexcan_open(struct net_device *dev) ...@@ -816,6 +816,8 @@ static int flexcan_open(struct net_device *dev)
return 0; return 0;
out_free_irq:
free_irq(dev->irq, dev);
out_close: out_close:
close_candev(dev); close_candev(dev);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment