Commit 086cebfa authored by Arvind Yadav's avatar Arvind Yadav Committed by Dmitry Torokhov

Input: s3c2410_ts - handle return value of clk_prepare_enable

clk_prepare_enable() can fail here and we must check its return value.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent 58be7689
...@@ -264,7 +264,11 @@ static int s3c2410ts_probe(struct platform_device *pdev) ...@@ -264,7 +264,11 @@ static int s3c2410ts_probe(struct platform_device *pdev)
return -ENOENT; return -ENOENT;
} }
clk_prepare_enable(ts.clock); ret = clk_prepare_enable(ts.clock);
if (ret) {
dev_err(dev, "Failed! to enabled clocks\n");
goto err_clk_get;
}
dev_dbg(dev, "got and enabled clocks\n"); dev_dbg(dev, "got and enabled clocks\n");
ts.irq_tc = ret = platform_get_irq(pdev, 0); ts.irq_tc = ret = platform_get_irq(pdev, 0);
...@@ -353,7 +357,9 @@ static int s3c2410ts_probe(struct platform_device *pdev) ...@@ -353,7 +357,9 @@ static int s3c2410ts_probe(struct platform_device *pdev)
err_iomap: err_iomap:
iounmap(ts.io); iounmap(ts.io);
err_clk: err_clk:
clk_disable_unprepare(ts.clock);
del_timer_sync(&touch_timer); del_timer_sync(&touch_timer);
err_clk_get:
clk_put(ts.clock); clk_put(ts.clock);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment