Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cc1afa62 authored by Su Hui's avatar Su Hui Committed by Greg Kroah-Hartman
Browse files

net: chelsio: cxgb4: add an error code check in t4_load_phy_fw



[ Upstream commit 9f771493da935299c6393ad3563b581255d01a37 ]

t4_set_params_timeout() can return -EINVAL if failed, add check
for this.

Signed-off-by: default avatarSu Hui <suhui@nfschina.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 7e429d1f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -3850,6 +3850,8 @@ int t4_load_phy_fw(struct adapter *adap,
		 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.