From: Huang Shijie Date: Tue, 11 Sep 2012 07:30:30 +0000 (+0800) Subject: serial: mxs-auart: put the device in the error path X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=23666a74c9f552bc9cfef20ded1b8b29bedb80c6;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Greg Kroah-Hartman --- 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: 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);