提交 23666a74 编写于 作者: H Huang Shijie 提交者: Greg Kroah-Hartman

serial: mxs-auart: put the device in the error path

The mxs_auart_probe() gets the device by the get_device().
So we should put the device in the error path to balance the
device's reference counter.
Signed-off-by: NHuang Shijie <b32955@freescale.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 cdd86b27
......@@ -781,6 +781,7 @@ static int __devinit mxs_auart_probe(struct platform_device *pdev)
auart_port[pdev->id] = NULL;
free_irq(s->irq, s);
out_free_clk:
put_device(s->dev);
clk_put(s->clk);
out_free:
kfree(s);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册