Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 23666a74 authored by Huang Shijie's avatar Huang Shijie Committed by Greg Kroah-Hartman
Browse files

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: default avatarHuang Shijie <b32955@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cdd86b27
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);