]> www.infradead.org Git - users/dwmw2/linux.git/commit
mlxsw: core_thermal: Call thermal_zone_device_unregister() unconditionally
authorIdo Schimmel <idosch@nvidia.com>
Tue, 30 Jul 2024 13:58:12 +0000 (15:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 1 Aug 2024 01:38:27 +0000 (18:38 -0700)
commita1bb54b1a066e30e4130205a7dba78db9df56fa8
treed2f7b75ad38d18b20a294e3b3e4238ed61648da6
parent9c26a1d0a01c941706fd0be55915b4db87bbe7c3
mlxsw: core_thermal: Call thermal_zone_device_unregister() unconditionally

The function returns immediately if the thermal zone pointer is NULL so
there is no need to check it before calling the function.

Remove the check.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Wojciech Drewek <wojciech.drewek@intel.com>
Link: https://patch.msgid.link/0bd251aa8ce03d3c951983aa6b4300d8205b88a7.1722345311.git.petrm@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/core_thermal.c