]> git.baikalelectronics.ru Git - kernel.git/commit
platform/mellanox: mlxreg-lc: Fix coverity warning
authorVadim Pasternak <vadimp@nvidia.com>
Tue, 23 Aug 2022 20:19:34 +0000 (23:19 +0300)
committerHans de Goede <hdegoede@redhat.com>
Thu, 1 Sep 2022 12:22:48 +0000 (14:22 +0200)
commit17c2bd6bea4c32fe691c1f9ebcc20fd48d77454a
tree20da3d4d5209388781aa6a261b8993a7695e0fa7
parentc3b82d26bc85f5fc2fef5ec8cce17c89633a55a8
platform/mellanox: mlxreg-lc: Fix coverity warning

Fix smatch warning:
drivers/platform/mellanox/mlxreg-lc.c:866 mlxreg_lc_probe() warn: passing zero to 'PTR_ERR'
by removing 'err = PTR_ERR(regmap)'.

Fixes: b4b830a34d80 ("platform/mellanox: mlxreg-lc: Fix error flow and extend verbosity")
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Vadim Pasternak <vadimp@nvidia.com>
Link: https://lore.kernel.org/r/20220823201937.46855-2-vadimp@nvidia.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/mlxreg-lc.c