ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL
authorJonghwan Choi <jhbird.choi@samsung.com>
Wed, 20 Jun 2012 08:05:37 +0000 (17:05 +0900)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 4 Jul 2012 04:44:22 +0000 (05:44 +0100)
commit a5d8f4765f0e92ef027492a8cb979c5b8d45f2c3 upstream.

On the error condition clk_get() returns ERR_PTR().

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
arch/arm/plat-samsung/include/plat/watchdog-reset.h

index 40dbb2b..11b19ea 100644 (file)
@@ -24,7 +24,7 @@ static inline void arch_wdt_reset(void)
 
        __raw_writel(0, S3C2410_WTCON);   /* disable watchdog, to be safe  */
 
-       if (s3c2410_wdtclk)
+       if (!IS_ERR(s3c2410_wdtclk))
                clk_enable(s3c2410_wdtclk);
 
        /* put initial values into count and data */