aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/can
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2014-02-28 08:52:01 -0500
committerMarc Kleine-Budde <mkl@pengutronix.de>2014-03-03 06:41:22 -0500
commit7e9e148af01ef388efb6e2490805970be4622792 (patch)
treefc82b7fda213f81f5360514192f3483d018accfa /drivers/net/can
parent5be93bdda64e85450598c6e97f79fb8f6acf30e0 (diff)
can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails
If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed, this patch adds the missing cleanup. Cc: linux-stable <stable@vger.kernel.org> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can')
-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 dcd69c9374ae..30af702a07ad 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -868,7 +868,7 @@ static int flexcan_open(struct net_device *dev)
868 /* start chip and queuing */ 868 /* start chip and queuing */
869 err = flexcan_chip_start(dev); 869 err = flexcan_chip_start(dev);
870 if (err) 870 if (err)
871 goto out_close; 871 goto out_free_irq;
872 872
873 can_led_event(dev, CAN_LED_EVENT_OPEN); 873 can_led_event(dev, CAN_LED_EVENT_OPEN);
874 874
@@ -877,6 +877,8 @@ static int flexcan_open(struct net_device *dev)
877 877
878 return 0; 878 return 0;
879 879
880 out_free_irq:
881 free_irq(dev->irq, dev);
880 out_close: 882 out_close:
881 close_candev(dev); 883 close_candev(dev);
882 out_disable_per: 884 out_disable_per: