diff options
author | Marc Kleine-Budde <mkl@pengutronix.de> | 2014-02-28 14:52:01 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-03-23 21:38:19 -0700 |
commit | 7184df3a509dcf56c01d19b21709a7860d918600 (patch) | |
tree | ee9a2dcbcd2da44fd75f454ec7c9aa4c9fee2ad9 /drivers | |
parent | 83bb80f4ade8b6fa1e62a46aa67d52cc9fa12f0b (diff) |
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>
Diffstat (limited to 'drivers')
-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 f63169d6af2..6d388cff845 100644 --- a/drivers/net/can/flexcan.c +++ b/drivers/net/can/flexcan.c @@ -862,7 +862,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); @@ -871,6 +871,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: |