]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
ethtool: Fix an error code in cxgb2.c
authorYang Li <yang.lee@linux.alibaba.com>
Fri, 3 Sep 2021 06:42:33 +0000 (14:42 +0800)
committerKelsey Skunberg <kelsey.skunberg@canonical.com>
Tue, 12 Oct 2021 22:31:44 +0000 (16:31 -0600)
commit2b2cf02ff91a40d7d44c8d70be9118b68c3ad71a
tree336a9e56ce8f28024d00b22962db171be185b52d
parent58f8597b7496e9b3c2ac5592bfae007d65cf3b22
ethtool: Fix an error code in cxgb2.c

BugLink: https://bugs.launchpad.net/bugs/1946802
[ Upstream commit 7db8263a12155c7ae4ad97e850f1e499c73765fc ]

When adapter->registered_device_map is NULL, the value of err is
uncertain, we set err to -EINVAL to avoid ambiguity.

Clean up smatch warning:
drivers/net/ethernet/chelsio/cxgb/cxgb2.c:1114 init_one() warn: missing
error code 'err'

Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kelsey Skunberg <kelsey.skunberg@canonical.com>
drivers/net/ethernet/chelsio/cxgb/cxgb2.c