]> git.baikalelectronics.ru Git - kernel.git/commit
platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 15 Jun 2022 08:11:07 +0000 (11:11 +0300)
committerHans de Goede <hdegoede@redhat.com>
Mon, 27 Jun 2022 07:37:49 +0000 (09:37 +0200)
commit422a6a3182a383ffd26b5720a0b0648b6fec4b06
treefe17e47cdfce65ecb3283a5178af06e2314ad4d5
parentc3367992a3eeeb36dcab6a2ffb0f9d4c7758f076
platform/mellanox: nvsw-sn2201: fix error code in nvsw_sn2201_create_static_devices()

This should return PTR_ERR() instead of IS_ERR().  Also "dev->client"
has been set to NULL by this point so it returns 0/success so preserve
the error code earlier.

Fixes: d6a845788cec ("platform/mellanox: Add support for new SN2201 system")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Michael Shych <michaelsh@nvidia.com>
Link: https://lore.kernel.org/r/YqmUGwmPK7cPolk/@kili
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
drivers/platform/mellanox/nvsw-sn2201.c