mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
thermal/drivers/hwmon: Cleanup coding style a bit
Function thermal_add_hwmon_sysfs, hwmon will be NULL when new_hwmon_device = 0, so there is no need to check, kfree will handle NULL point. Signed-off-by: Bernard Zhao <bernard@vivo.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> Link: https://lore.kernel.org/r/20201102023121.3312-1-bernard@vivo.com
This commit is contained in:
committed by
Daniel Lezcano
parent
e01aac5353
commit
030a48b0f6
@@ -206,7 +206,6 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)
|
|||||||
if (new_hwmon_device)
|
if (new_hwmon_device)
|
||||||
hwmon_device_unregister(hwmon->device);
|
hwmon_device_unregister(hwmon->device);
|
||||||
free_mem:
|
free_mem:
|
||||||
if (new_hwmon_device)
|
|
||||||
kfree(hwmon);
|
kfree(hwmon);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Reference in New Issue
Block a user