platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check
authorDaniil Dulov <d.dulov@aladdin.ru>
Wed, 6 Mar 2024 15:38:04 +0000 (18:38 +0300)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Mar 2024 10:48:36 +0000 (12:48 +0200)
commit30f96b2cb70d882515efae4d4af698f18a65c75e
tree504acbd40c1891d0969237c41b8846682fa9120e
parent8362e862fb87992f083f75dd49d029e8fc0d803b
platform/mellanox: mlxreg-hotplug: Remove redundant NULL-check

Pointer item is checked fo NULL at mlxreg_hotplug_work_helper() and then
it is dereferenced to produce dev_err().
This pointer is also dereferenced before calling this function and should
never be NULL except some piece of hardware is broken as it is said in
the comment before the check. So, this check can be safely removed.

Found by Linux Verification Center (linuxtesting.org) with SVACE.

Fixes: c6acad68eb2d ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Signed-off-by: Daniil Dulov <d.dulov@aladdin.ru>
Reviewed-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20240306153804.6509-1-d.dulov@aladdin.ru
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/mellanox/mlxreg-hotplug.c