From 4f13a6735fd60587c9c6ae93414b6df01c833214 Mon Sep 17 00:00:00 2001 From: Qi Zhang Date: Mon, 15 Jun 2020 10:04:57 +0800 Subject: [PATCH] net/ice/base: fix return value Function ice_rem_adv_rule_id return incorrect error code (ICE_ERR_PARAM) whereas it should have returned ICE_ERR_DOES_NOT_EXIST return code if filter list is empty or unable to find "rule" in list Fixes: f89aa3affa9e ("net/ice/base: support removing advanced rule") Cc: stable@dpdk.org Signed-off-by: Kiran Patil Signed-off-by: Paul M Stillwell Jr Signed-off-by: Qi Zhang Acked-by: Qiming Yang --- drivers/net/ice/base/ice_switch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ice/base/ice_switch.c b/drivers/net/ice/base/ice_switch.c index 01dcace557..5c53b9ec3b 100644 --- a/drivers/net/ice/base/ice_switch.c +++ b/drivers/net/ice/base/ice_switch.c @@ -7661,7 +7661,8 @@ ice_rem_adv_rule_by_id(struct ice_hw *hw, list_itr->lkups_cnt, &rinfo); } } - return ICE_ERR_PARAM; + /* either list is empty or unable to find rule */ + return ICE_ERR_DOES_NOT_EXIST; } /** -- 2.20.1