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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent ca082f0 commit 9f77149

File tree

1 file changed

+2
-0
lines changed
  • drivers/net/ethernet/chelsio/cxgb4

1 file changed

+2
-0
lines changed

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)