bnxt_en: Check devlink allocation and registration status
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 23 Sep 2021 18:12:48 +0000 (21:12 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Sep 2021 13:12:56 +0000 (14:12 +0100)
commite624c70e1131e145bd0510b8a700b5e2d112e377
treeaef2155641108c7cbfd78f9730507322785bdaa4
parenta8551c9b755e5a3e530e127833a772e49bfccf33
bnxt_en: Check devlink allocation and registration status

devlink is a software interface that doesn't depend on any hardware
capabilities. The failure in SW means memory issues, wrong parameters,
programmer error e.t.c.

Like any other such interface in the kernel, the returned status of
devlink APIs should be checked and propagated further and not ignored.

Fixes: 4ab0c6a8ffd7 ("bnxt_en: add support to enable VF-representors")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h