diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-08-25 08:34:47 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-08-26 11:44:50 +0200 |
commit | 5e8243e66b4d80eeaf9ed8cb0235ff133630a014 (patch) | |
tree | 8b91c477e3ccdd8087924ab7d415ade844bb6362 /drivers | |
parent | Merge branch 'ionic-next' (diff) | |
download | linux-5e8243e66b4d80eeaf9ed8cb0235ff133630a014.tar.xz linux-5e8243e66b4d80eeaf9ed8cb0235ff133630a014.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c index e02682770f16..67dced63b16e 100644 --- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c +++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c @@ -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: |