提交 01b6af91 编写于 作者: S Sachin Kamat 提交者: Wim Van Sebroeck

watchdog: s3c2410_wdt: Check return value of clk_prepare_enable

clk_prepare_enable can fail. Check its return value.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 a94dd879
......@@ -525,7 +525,11 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
goto err;
}
clk_prepare_enable(wdt->clock);
ret = clk_prepare_enable(wdt->clock);
if (ret < 0) {
dev_err(dev, "failed to enable clock\n");
return ret;
}
ret = s3c2410wdt_cpufreq_register(wdt);
if (ret < 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册