Unverified Commit 30f96b2c authored by Daniil Dulov's avatar Daniil Dulov Committed by Ilpo Järvinen
Browse files

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: c6acad68 ("platform/mellanox: mlxreg-hotplug: Modify to use a regmap interface")
Signed-off-by: default avatarDaniil Dulov <d.dulov@aladdin.ru>
Reviewed-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20240306153804.6509-1-d.dulov@aladdin.ru


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 8362e862
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment