diff options
author | 2023-10-20 17:27:59 +0800 | |
---|---|---|
committer | 2023-10-22 11:36:30 +0100 | |
commit | 9f771493da935299c6393ad3563b581255d01a37 (patch) | |
tree | 82da07f229f75cd64864b4ccbc2012bd4bf9cae8 | |
parent | net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show() (diff) | |
download | wireguard-linux-9f771493da935299c6393ad3563b581255d01a37.tar.xz wireguard-linux-9f771493da935299c6393ad3563b581255d01a37.zip |
net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
t4_set_params_timeout() can return -EINVAL if failed, add check
for this.
Signed-off-by: Su Hui <suhui@nfschina.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c index 8d719f82854a..76de55306c4d 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.c @@ -3816,6 +3816,8 @@ int t4_load_phy_fw(struct adapter *adap, int win, FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD)); ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1, ¶m, &val, 30000); + if (ret) + return ret; /* If we have version number support, then check to see that the new * firmware got loaded properly. |