Unverified Commit fbbdb703 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!14852 octeontx2-pf: handle otx2_mbox_get_rsp errors in otx2_ethtool.c

parents 157d5d0e 60623da4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -264,6 +264,11 @@ static void otx2_get_pauseparam(struct net_device *netdev,
	if (!otx2_sync_mbox_msg(&pfvf->mbox)) {
		rsp = (struct cgx_pause_frm_cfg *)
		       otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
		if (IS_ERR(rsp)) {
			mutex_unlock(&pfvf->mbox.lock);
			return;
		}

		pause->rx_pause = rsp->rx_pause;
		pause->tx_pause = rsp->tx_pause;
	}