Commit a523c634 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Ben Hutchings

can: flexcan: flexcan_open(): fix error path if flexcan_chip_start() fails

commit 7e9e148a upstream.

If flexcan_chip_start() in flexcan_open() fails, the interrupt is not freed,
this patch adds the missing cleanup.
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 5fdcc8da
......@@ -811,12 +811,14 @@ 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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment