]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Mar 2022 12:22:28 +0000 (12:22 +0000)
commitd7efd76118eb049e6e5d79f97688e0ea920a6270
treeee4514b2448203c4ee5800cdd943abe59c3dd340
parent3d442b697db66c991546a659a5c63981a9fb7a68
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: 2e779d4f101a ("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