Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arvind Yadav and committed by
Eduardo Valentin
919054fd e3bdc8d7

+4 -1
+4 -1
drivers/thermal/hisi_thermal.c
··· 397 397 static int hisi_thermal_resume(struct device *dev) 398 398 { 399 399 struct hisi_thermal_data *data = dev_get_drvdata(dev); 400 + int ret; 400 401 401 - clk_prepare_enable(data->clk); 402 + ret = clk_prepare_enable(data->clk); 403 + if (ret) 404 + return ret; 402 405 403 406 data->irq_enabled = true; 404 407 hisi_thermal_enable_bind_irq_sensor(data);