]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 5 Nov 2021 09:19:29 +0000 (10:19 +0100)
commitd6f78496a488d1e867a7642e7bfe7696c01b36d1
treec1f8704a35ab7ce2f91b20fc406a9da318e4fda2
parentebec576c0653c7a7c69950bddcb9705e133f1b0d
ethtool: Fix an error code in cxgb2.c

BugLink: https://bugs.launchpad.net/bugs/1948873
[ 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