aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog/pnx4008_wdt.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2006-12-19 03:51:44 -0500
committerWim Van Sebroeck <wim@iguana.be>2006-12-19 16:16:51 -0500
commit9cd446198e7646431a7f2ce7dbeec8df9f77012b (patch)
treeab2bb2cf8eff7c7e75b8cf34174692c02ebdd8be /drivers/char/watchdog/pnx4008_wdt.c
parent0b6dd8a640fbaf73b74949b6dc2be50263532576 (diff)
[WATCHDOG] fix clk_get() error check
The return value of clk_get() should be checked by IS_ERR(). Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/char/watchdog/pnx4008_wdt.c')
-rw-r--r--drivers/char/watchdog/pnx4008_wdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/watchdog/pnx4008_wdt.c b/drivers/char/watchdog/pnx4008_wdt.c
index 3a55fc6abcd8..0e3d589d6332 100644
--- a/drivers/char/watchdog/pnx4008_wdt.c
+++ b/drivers/char/watchdog/pnx4008_wdt.c
@@ -283,7 +283,8 @@ static int pnx4008_wdt_probe(struct platform_device *pdev)
283 wdt_base = (void __iomem *)IO_ADDRESS(res->start); 283 wdt_base = (void __iomem *)IO_ADDRESS(res->start);
284 284
285 wdt_clk = clk_get(&pdev->dev, "wdt_ck"); 285 wdt_clk = clk_get(&pdev->dev, "wdt_ck");
286 if (!wdt_clk) { 286 if (IS_ERR(wdt_clk)) {
287 ret = PTR_ERR(wdt_clk);
287 release_resource(wdt_mem); 288 release_resource(wdt_mem);
288 kfree(wdt_mem); 289 kfree(wdt_mem);
289 goto out; 290 goto out;