]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
qed: return status of qed_iov_get_link
authorTom Rix <trix@redhat.com>
Sat, 5 Mar 2022 15:06:42 +0000 (07:06 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Mar 2022 11:57:06 +0000 (12:57 +0100)
commitd7ba28a3902c1e0b228ae0c862989f65733a50e8
treecb980b25b82a5df7caa61b7d7158713c3d142ce8
parent9ace998abd043e097384843e0e52f3bfb6b62c25
qed: return status of qed_iov_get_link

[ Upstream commit d9dc0c84ad2d4cc911ba252c973d1bf18d5eb9cf ]

Clang static analysis reports this issue
qed_sriov.c:4727:19: warning: Assigned value is
  garbage or undefined
  ivi->max_tx_rate = tx_rate ? tx_rate : link.speed;
                   ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

link is only sometimes set by the call to qed_iov_get_link()
qed_iov_get_link fails without setting link or returning
status.  So change the decl to return status.

Fixes: 73390ac9d82b ("qed*: support ndo_get_vf_config")
Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_sriov.c