Skip to content

Commit

Permalink
octeontx2-pf: cn10k: Fix error return code in otx2_set_flowkey_cfg()
Browse files Browse the repository at this point in the history
[ Upstream commit 5e8243e ]

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 <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Yang Yingliang authored and gregkh committed Sep 15, 2021
1 parent bf412d9 commit 39df08f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
Expand Up @@ -289,8 +289,10 @@ int otx2_set_flowkey_cfg(struct otx2_nic *pfvf)

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

pfvf->hw.flowkey_alg_idx = rsp->alg_idx;
fail:
Expand Down

0 comments on commit 39df08f

Please sign in to comment.