diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-06-06 15:04:46 +0530 |
---|---|---|
committer | Eduardo Valentin <edubezval@gmail.com> | 2017-06-30 16:46:10 -0700 |
commit | 919054fdfc8adf58c5512fe9872eb53ea0f5525d (patch) | |
tree | a37de28ea97e4309b711250711c573d2caf0e8c3 /drivers | |
parent | e3bdc8d7623d5875403ad40443e7b049ae200fcd (diff) | |
download | op-kernel-dev-919054fdfc8adf58c5512fe9872eb53ea0f5525d.zip op-kernel-dev-919054fdfc8adf58c5512fe9872eb53ea0f5525d.tar.gz |
thermal: hisilicon: 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: Eduardo Valentin <edubezval@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/thermal/hisi_thermal.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c index f642966..9c3ce34 100644 --- a/drivers/thermal/hisi_thermal.c +++ b/drivers/thermal/hisi_thermal.c @@ -397,8 +397,11 @@ static int hisi_thermal_suspend(struct device *dev) static int hisi_thermal_resume(struct device *dev) { struct hisi_thermal_data *data = dev_get_drvdata(dev); + int ret; - clk_prepare_enable(data->clk); + ret = clk_prepare_enable(data->clk); + if (ret) + return ret; data->irq_enabled = true; hisi_thermal_enable_bind_irq_sensor(data); |