Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 69dd89a1 authored by Arvind Yadav's avatar Arvind Yadav Committed by Greg Kroah-Hartman
Browse files

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: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: default avatarEduardo Valentin <edubezval@gmail.com>
Signed-off-by: default avatarKevin Wangtao <kevin.wangtao@hisilicon.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0303e4f
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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);