From: Zhang Rui Date: Sun, 13 Aug 2023 02:52:20 +0000 (+0800) Subject: thermal: intel: intel_soc_dts_iosf: Remove redundant check X-Git-Tag: v6.6.7~2095^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ee188ee6ed3821ec20c1d3e8b7aacd844924b10b;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/thermal/intel/intel_soc_dts_iosf.c b/drivers/thermal/intel/intel_soc_dts_iosf.c index 7a66d0f..d00def3 100644 --- a/drivers/thermal/intel/intel_soc_dts_iosf.c +++ b/drivers/thermal/intel/intel_soc_dts_iosf.c @@ -212,11 +212,9 @@ static int soc_dts_enable(int id) static void remove_dts_thermal_zone(struct intel_soc_dts_sensor_entry *dts) { - if (dts) { - iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, - SOC_DTS_OFFSET_ENABLE, dts->store_status); - thermal_zone_device_unregister(dts->tzone); - } + iosf_mbi_write(BT_MBI_UNIT_PMC, MBI_REG_WRITE, + SOC_DTS_OFFSET_ENABLE, dts->store_status); + thermal_zone_device_unregister(dts->tzone); } static int add_dts_thermal_zone(int id, struct intel_soc_dts_sensor_entry *dts,