thermal/drivers/k3_j72xx_bandgap: Simplify k3_thermal_get_temp() function
The k3_thermal_get_temp() function can be simplified to return only the result of k3_bgp_read_temp() without needing the 'ret' variable Signed-off-by: Bryan Brattlof <bb@ti.com> Link: https://lore.kernel.org/r/20221031232702.10339-2-bb@ti.com Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
This commit is contained in:
parent
2baad24963
commit
46cab93ab4
@ -249,14 +249,7 @@ static inline int k3_bgp_read_temp(struct k3_thermal_data *devdata,
|
|||||||
/* Get temperature callback function for thermal zone */
|
/* Get temperature callback function for thermal zone */
|
||||||
static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
|
static int k3_thermal_get_temp(struct thermal_zone_device *tz, int *temp)
|
||||||
{
|
{
|
||||||
struct k3_thermal_data *data = tz->devdata;
|
return k3_bgp_read_temp(tz->devdata, temp);
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
ret = k3_bgp_read_temp(data, temp);
|
|
||||||
if (ret)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct thermal_zone_device_ops k3_of_thermal_ops = {
|
static const struct thermal_zone_device_ops k3_of_thermal_ops = {
|
||||||
|
Loading…
Reference in New Issue
Block a user