diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-03-04 04:34:35 -0500 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2014-03-31 07:33:16 -0400 |
commit | 01b6af91593629224490b76c4bf4b0eb8cfbfb31 (patch) | |
tree | 8ca8edc9c6b9ede3359aa72b16d0ec8a14f8e918 /drivers/watchdog/s3c2410_wdt.c | |
parent | a94dd879e2939798294c56468add3d6a8ef04137 (diff) |
watchdog: s3c2410_wdt: Check return value of clk_prepare_enable
clk_prepare_enable can fail. Check its return value.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/s3c2410_wdt.c')
-rw-r--r-- | drivers/watchdog/s3c2410_wdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/watchdog/s3c2410_wdt.c b/drivers/watchdog/s3c2410_wdt.c index a0f8f771adec..7c6ccd071baf 100644 --- a/drivers/watchdog/s3c2410_wdt.c +++ b/drivers/watchdog/s3c2410_wdt.c | |||
@@ -525,7 +525,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev) | |||
525 | goto err; | 525 | goto err; |
526 | } | 526 | } |
527 | 527 | ||
528 | clk_prepare_enable(wdt->clock); | 528 | ret = clk_prepare_enable(wdt->clock); |
529 | if (ret < 0) { | ||
530 | dev_err(dev, "failed to enable clock\n"); | ||
531 | return ret; | ||
532 | } | ||
529 | 533 | ||
530 | ret = s3c2410wdt_cpufreq_register(wdt); | 534 | ret = s3c2410wdt_cpufreq_register(wdt); |
531 | if (ret < 0) { | 535 | if (ret < 0) { |