qed: return status of qed_iov_get_link
authorTom Rix <trix@redhat.com>
Sat, 5 Mar 2022 15:06:42 +0000 (07:06 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Mar 2022 12:22:28 +0000 (12:22 +0000)
commitd9dc0c84ad2d4cc911ba252c973d1bf18d5eb9cf
treeee4514b2448203c4ee5800cdd943abe59c3dd340
parentbb77bd31c281f70ec77c9c4f584950a779e05cf8
qed: return status of qed_iov_get_link

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>
drivers/net/ethernet/qlogic/qed/qed_sriov.c