Skip to content

Commit 5e8243e

Browse files
Yang Yingliangdavem330
authored andcommitted
octeontx2-pf: cn10k: Fix error return code in otx2_set_flowkey_cfg()
If otx2_mbox_get_rsp() fails, otx2_set_flowkey_cfg() need return an error code. Fixes: e793836 ("octeontx2-pf: Fix algorithm index in MCAM rules with RSS action") Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b13cead commit 5e8243e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,10 @@ int otx2_set_flowkey_cfg(struct otx2_nic *pfvf)
289289

290290
rsp = (struct nix_rss_flowkey_cfg_rsp *)
291291
otx2_mbox_get_rsp(&pfvf->mbox.mbox, 0, &req->hdr);
292-
if (IS_ERR(rsp))
292+
if (IS_ERR(rsp)) {
293+
err = PTR_ERR(rsp);
293294
goto fail;
295+
}
294296

295297
pfvf->hw.flowkey_alg_idx = rsp->alg_idx;
296298
fail:

0 commit comments

Comments
 (0)