]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
thermal: hisilicon: Handle return value of clk_prepare_enable
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Tue, 6 Jun 2017 09:34:46 +0000 (15:04 +0530)
committerEduardo Valentin <edubezval@gmail.com>
Fri, 30 Jun 2017 23:46:10 +0000 (16:46 -0700)
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>
drivers/thermal/hisi_thermal.c

index f6429666a1cfe03d1f122266938a5343cf744054..9c3ce341eb97563822d510398b8b4d06c71af3f1 100644 (file)
@@ -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);