diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-05-30 09:44:28 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-06-02 17:57:26 -0700 |
commit | 086cebfa72fa22e1e49f251d33fe1ceaab4af2d4 (patch) | |
tree | 023f868ca21563594a2c5025c5edc66d390944f6 /drivers/input/touchscreen/s3c2410_ts.c | |
parent | 58be76896786b512e97cb743ec271648623a7107 (diff) | |
download | linux-086cebfa72fa22e1e49f251d33fe1ceaab4af2d4.tar.bz2 |
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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/s3c2410_ts.c')
-rw-r--r-- | drivers/input/touchscreen/s3c2410_ts.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/s3c2410_ts.c b/drivers/input/touchscreen/s3c2410_ts.c index 41d58e88cc8a..3b3db8c868e0 100644 --- a/drivers/input/touchscreen/s3c2410_ts.c +++ b/drivers/input/touchscreen/s3c2410_ts.c @@ -264,7 +264,11 @@ static int s3c2410ts_probe(struct platform_device *pdev) 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"); ts.irq_tc = ret = platform_get_irq(pdev, 0); @@ -353,7 +357,9 @@ static int s3c2410ts_probe(struct platform_device *pdev) err_iomap: iounmap(ts.io); err_clk: + clk_disable_unprepare(ts.clock); del_timer_sync(&touch_timer); + err_clk_get: clk_put(ts.clock); return ret; } |