diff options
author | Huang Shijie <b32955@freescale.com> | 2012-09-11 03:30:30 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-11 15:21:33 -0400 |
commit | 23666a74c9f552bc9cfef20ded1b8b29bedb80c6 (patch) | |
tree | 928253889b5fa1e00a59ad72e2d2ca1ad0bc2d9f | |
parent | cdd86b277dc82220aa630414896505517a02a201 (diff) |
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: Huang Shijie <b32955@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/serial/mxs-auart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 68984136bfb1..6db3baa39a97 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c | |||
@@ -781,6 +781,7 @@ out_free_irq: | |||
781 | auart_port[pdev->id] = NULL; | 781 | auart_port[pdev->id] = NULL; |
782 | free_irq(s->irq, s); | 782 | free_irq(s->irq, s); |
783 | out_free_clk: | 783 | out_free_clk: |
784 | put_device(s->dev); | ||
784 | clk_put(s->clk); | 785 | clk_put(s->clk); |
785 | out_free: | 786 | out_free: |
786 | kfree(s); | 787 | kfree(s); |