diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-06-06 15:04:46 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-12-25 14:23:46 +0100 |
commit | 82bf76afa8affad676ba6442bd4656f842312988 (patch) | |
tree | f1dc1ad3ea0d6f8576c81e37f7946239c087ea22 /drivers/thermal | |
parent | b86c7b8c5dfb2a68bce79e1ad3fe50e06022d1f6 (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/thermal')
-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 f6429666a1cf..9c3ce341eb97 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); |