Skip to content

Commit ee188ee

Browse files
zhang-ruirafaeljw
authored andcommitted
thermal: intel: intel_soc_dts_iosf: Remove redundant check
Remove the redundant check in remove_dts_thermal_zone() because all of its existing callers pass a valid pointer as the argument. Signed-off-by: Zhang Rui <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 1a6e100 commit ee188ee

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/thermal/intel/intel_soc_dts_iosf.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,11 +212,9 @@ static int soc_dts_enable(int id)
212212

213213
static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts)
214214
{
215-
if (dts) {
216-
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE,
217-
SOC_DTS_OFFSET_ENABLE, dts->store_status);
218-
thermal_zone_device_unregister(dts->tzone);
219-
}
215+
iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE,
216+
SOC_DTS_OFFSET_ENABLE, dts->store_status);
217+
thermal_zone_device_unregister(dts->tzone);
220218
}
221219

222220
static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts,

0 commit comments

Comments
 (0)