Skip to content

Commit

Permalink
ARM: SAMSUNG: Should check for IS_ERR(clk) instead of NULL
Browse files Browse the repository at this point in the history
On the error condition clk_get() returns ERR_PTR().

Signed-off-by: Jonghwan Choi <jhbird.choi@samsung.com>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
  • Loading branch information
Jonghwan Choi authored and Kukjin Kim committed Jun 20, 2012
1 parent 485802a commit a5d8f47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/plat-samsung/include/plat/watchdog-reset.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,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 */
Expand Down

0 comments on commit a5d8f47

Please sign in to comment.