Skip to content

Commit 9f77149

Browse files
Su Huidavem330
authored andcommitted
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>
1 parent ca082f0 commit 9f77149

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

  • drivers/net/ethernet/chelsio/cxgb4

drivers/net/ethernet/chelsio/cxgb4/t4_hw.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,8 @@ int t4_load_phy_fw(struct adapter *adap, int win,
38163816
FW_PARAMS_PARAM_Z_V(FW_PARAMS_PARAM_DEV_PHYFW_DOWNLOAD));
38173817
ret = t4_set_params_timeout(adap, adap->mbox, adap->pf, 0, 1,
38183818
&param, &val, 30000);
3819+
if (ret)
3820+
return ret;
38193821

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

0 commit comments

Comments
 (0)