summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-06-06 15:04:46 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-12-25 14:22:15 +0100
commit69dd89a1f919df7ab2e38f6f73fca0735d620205 (patch)
tree5d0468c24d184ae939cee6a0f5070aba8c5dfd1e /drivers
parentc0303e4ffd3a9822801869f075b8bbf0610151ee (diff)
thermal: hisilicon: Handle return value of clk_prepare_enable
commit 919054fdfc8adf58c5512fe9872eb53ea0f5525d upstream. 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> Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/thermal/hisi_thermal.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/thermal/hisi_thermal.c b/drivers/thermal/hisi_thermal.c
index 36d07295f8e3..a56f6cac6fc5 100644
--- a/drivers/thermal/hisi_thermal.c
+++ b/drivers/thermal/hisi_thermal.c
@@ -389,8 +389,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);