Skip to content

Commit

Permalink
net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
Browse files Browse the repository at this point in the history
[ Upstream commit 9f77149 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Su Hui authored and gregkh committed Nov 8, 2023
1 parent ff86d69 commit 98567c9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/ethernet/chelsio/cxgb4/t4_hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
&param, &val, 30000);
if (ret)
return ret;

/* If we have version number support, then check to see that the new
* firmware got loaded properly.
Expand Down

0 comments on commit 98567c9

Please sign in to comment.