From: Qi Zhang Date: Mon, 15 Jun 2020 02:04:57 +0000 (+0800) Subject: net/ice/base: fix return value X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=4f13a6735fd60587c9c6ae93414b6df01c833214;p=dpdk.git 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 --- 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; } /**