lkml.org 
[lkml]   [2006]   [Dec]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] watchdog: fix clk_get() error check
Hi Ben,

> On Tue, Dec 19, 2006 at 05:51:44PM +0900, Akinobu Mita wrote:
> > The return value of clk_get() should be checked by IS_ERR().
>
> thanks for spotting this, but this will probably clash with
> a cleanup patch I sent a day or two ago to streamline the
> exit path in the driver.
>
> see http://lkml.org/lkml/2006/12/18/65

It did, but I modified it slightly so that it worked with your
previous patch also. Can you test below patch?

Thanks,
Wim.

--- 2.6-mm.orig/drivers/char/watchdog/s3c2410_wdt.c
+++ 2.6-mm/drivers/char/watchdog/s3c2410_wdt.c
@@ -393,9 +393,9 @@
}

wdt_clock = clk_get(&pdev->dev, "watchdog");
- if (wdt_clock == NULL) {
+ if (IS_ERR(wdt_clock)) {
printk(KERN_INFO PFX "failed to find watchdog clock source\n");
- ret = -ENOENT;
+ ret = PTR_ERR(wdt_clock);
goto err_irq;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-12-19 22:25    [W:0.046 / U:2.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site