• Tom Rix's avatar
    qed: return status of qed_iov_get_link · d9dc0c84
    Tom Rix authored
    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: 73390ac9
    
     ("qed*: support ndo_get_vf_config")
    Signed-off-by: default avatarTom Rix <trix@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    d9dc0c84
qed_sriov.c 141 KB