]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
bnxt_en: Check devlink allocation and registration status
authorLeon Romanovsky <leonro@nvidia.com>
Thu, 23 Sep 2021 18:12:48 +0000 (21:12 +0300)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:19 +0000 (09:48 +0100)
commitf159de7c70b4b662677c1a4539def383a4042555
tree9eef3eb415ecd3eb05e19d68216a8cf5bd4f7ac5
parent7d3fba55a0b2cf5ae755e748506b1d02544cb952
bnxt_en: Check devlink allocation and registration status

BugLink: https://bugs.launchpad.net/bugs/1951822
[ Upstream commit e624c70e1131e145bd0510b8a700b5e2d112e377 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.c
drivers/net/ethernet/broadcom/bnxt/bnxt_devlink.h