drivers/thermal: cleanup coding style a bit
PATCH 1/1 drivers/thermal: 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 <[email protected]>
--- drivers/thermal/thermal_hwmon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/thermal/thermal_hwmon.c +1 -2
@@ -206,8 +206,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)if (new_hwmon_device)hwmon_device_unregister (hwmon->device); free_mem: -if (new_hwmon_device) -kfree (hwmon); +kfree (hwmon);return result; }
Signature · 1 line
2.29.0
[thermal: thermal/next] thermal/drivers/hwmon: Cleanup coding style a bit
The following commit has been merged into the thermal/next branch of thermal:
The following commit has been merged into the thermal/next branch of thermal:
Commit-ID: 030a48b0f6ce393d78b8d33debb1e2043b8cc156 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//030a48b0f6ce393d78b8d33debb1e2043b8cc156 Author: Bernard Zhao <[email protected]> AuthorDate: Sun, 01 Nov 2020 18:31:21 -08:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Thu, 12 Nov 2020 11:24:01 +01: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 <[email protected]>
Signed-off-by Daniel Lezcano <[email protected]>
--- drivers/thermal/thermal_hwmon.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/thermal/thermal_hwmon.c +1 -2
@@ -206,8 +206,7 @@ int thermal_add_hwmon_sysfs(struct thermal_zone_device *tz)if (new_hwmon_device)hwmon_device_unregister (hwmon->device); free_mem: -if (new_hwmon_device) -kfree (hwmon); +kfree (hwmon);return result; }