diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-02-28 13:52:01 (GMT) |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-03-24 08:45:01 (GMT) |
commit | a822076cdfb8162652a799e8038606e3bf3b1cd4 (patch) | |
tree | 95fcb7c501851eb6a2228b6c1fe9de09f459a1e4 /drivers/net | |
parent | e32578deab8a4d815dbb7211b47f099fb00b4bd5 (diff) | |
download | linux-fsl-qoriq-a822076cdfb8162652a799e8038606e3bf3b1cd4.tar.xz |
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: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/can/flexcan.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c index 26c8b2d..ba7a554 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -865,7 +865,7 @@ static int flexcan_open(struct net_device *dev) /* start chip and queuing */ err = flexcan_chip_start(dev); if (err) - goto out_close; + goto out_free_irq; can_led_event(dev, CAN_LED_EVENT_OPEN); @@ -874,6 +874,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_disable_per: |