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

!14424 octeontx2-pf: handle otx2_mbox_get_rsp errors in cn10k.c

parents 69e92f85 6e8a8123
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -203,6 +203,11 @@ int cn10k_alloc_leaf_profile(struct otx2_nic *pfvf, u16 *leaf)

	rsp = (struct  nix_bandprof_alloc_rsp *)
	       otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
	if (IS_ERR(rsp)) {
		rc = PTR_ERR(rsp);
		goto out;
	}

	if (!rsp->prof_count[BAND_PROF_LEAF_LAYER]) {
		rc = -EIO;
		goto out;