Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: e7938365459f ("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>

authored by

Yang Yingliang and committed by
David S. Miller
5e8243e6 b13cead1

+3 -1
+3 -1
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
··· 289 289 290 290 rsp = (struct nix_rss_flowkey_cfg_rsp *) 291 291 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); 293 294 goto fail; 295 + } 294 296 295 297 pfvf->hw.flowkey_alg_idx = rsp->alg_idx; 296 298 fail: