Skip to content

Commit

Permalink
serial: mxs-auart: put the device in the error path
Browse files Browse the repository at this point in the history
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: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Huang Shijie authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent cdd86b2 commit 23666a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/tty/serial/mxs-auart.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 23666a7

Please sign in to comment.