[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121214055332.10081.96498.sendpatchset@w520>
Date: Fri, 14 Dec 2012 14:53:32 +0900
From: Magnus Damm <magnus.damm@...il.com>
To: linux-kernel@...r.kernel.org
Cc: linux-sh@...r.kernel.org, johnstul@...ibm.com, horms@...ge.net.au,
shinya.kuribayashi.px@...esas.com, tglx@...utronix.de,
Magnus Damm <magnus.damm@...il.com>
Subject: [PATCH 01/08] clocksource: sh_cmt: Take care of clk_put() when setup_irq() fails
From: Magnus Damm <damm@...nsource.se>
Make sure clk_put() is called in case of failure in sh_cmt_setup().
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@...esas.com>
Signed-off-by: Magnus Damm <damm@...nsource.se>
---
drivers/clocksource/sh_cmt.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- 0001/drivers/clocksource/sh_cmt.c
+++ work/drivers/clocksource/sh_cmt.c 2012-12-14 12:50:02.000000000 +0900
@@ -708,17 +708,19 @@ static int sh_cmt_setup(struct sh_cmt_pr
cfg->clocksource_rating);
if (ret) {
dev_err(&p->pdev->dev, "registration failed\n");
- goto err1;
+ goto err2;
}
p->cs_enabled = false;
ret = setup_irq(irq, &p->irqaction);
if (ret) {
dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
- goto err1;
+ goto err2;
}
return 0;
+err2:
+ clk_put(p->clk);
err1:
iounmap(p->mapbase);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists