提交 7e9e148a 编写于 作者: M Marc Kleine-Budde

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: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 5be93bdd
......@@ -868,7 +868,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);
......@@ -877,6 +877,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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册