summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2014-02-28 14:52:01 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-03-23 21:37:07 -0700
commitf8d17b6ff32a85be53f8055af5b35dc0cb96f62a (patch)
treeac6074accf2fec2e6f6317bb2fa76c370b89f379
parent5e764c599eb843a09e8c1f3aa6d4d86acd59c31c (diff)
downloadlwn-f8d17b6ff32a85be53f8055af5b35dc0cb96f62a.tar.gz
lwn-f8d17b6ff32a85be53f8055af5b35dc0cb96f62a.zip
can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails
commit 7e9e148af01ef388efb6e2490805970be4622792 upstream. If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed, this patch adds the missing cleanup. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/can/flexcan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index eb4014a25d3c..75e9233aabaf 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -805,7 +805,7 @@ static int flexcan_open(struct net_device *dev)
err = request_irq(dev->irq, flexcan_irq, IRQF_SHARED, dev->name, dev);
if (err)
- goto out_close;
+ goto out_free_irq;
/* start chip and queuing */
err = flexcan_chip_start(dev);
@@ -816,6 +816,8 @@ static int flexcan_open(struct net_device *dev)
return 0;
+ out_free_irq:
+ free_irq(dev->irq, dev);
out_close:
close_candev(dev);
out: