[3.5.y.z extended stable] Patch "can: flexcan: flexcan_open(): fix error path if flexcan_chip_start()" has been added to staging queue
Luis Henriques
luis.henriques at canonical.com
Thu Mar 13 11:00:47 UTC 2014
This is a note to let you know that I have just added a patch titled
can: flexcan: flexcan_open(): fix error path if flexcan_chip_start()
to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree
which can be found at:
http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Luis
------
>From f59094717abfc755e3b5c2ac3290b3df702145cc Mon Sep 17 00:00:00 2001
From: Marc Kleine-Budde <mkl at pengutronix.de>
Date: Fri, 28 Feb 2014 14:52:01 +0100
Subject: 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 at pengutronix.de>
[ luis: backported to 3.5: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
drivers/net/can/flexcan.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/can/flexcan.c b/drivers/net/can/flexcan.c
index 95109eb..8a5911f 100644
--- a/drivers/net/can/flexcan.c
+++ b/drivers/net/can/flexcan.c
@@ -813,12 +813,15 @@ 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;
+
napi_enable(&priv->napi);
netif_start_queue(dev);
return 0;
+ out_free_irq:
+ free_irq(dev->irq, dev);
out_close:
close_candev(dev);
out:
--
1.9.0
More information about the kernel-team
mailing list