Commit 7fa32a82 authored by Vaibhav Gupta's avatar Vaibhav Gupta

software: kernel: hwmon: return error code to hwmon framework

Reported-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
parent 9a10c5a9
......@@ -27,10 +27,12 @@ static int ft_hwmon_temp_read(struct device *dev, enum hwmon_sensor_types type,
ret = ft_temperature_get(ft, &value);
if(ret < 0)
if(ret < 0) {
dev_err(dev, "Could not read temperature: %d", ret);
else
*val = (long)value * 1000 / 16;
return ret;
}
*val = (long)value * 1000 / 16;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment