ACK

-----Original Message-----
From: Zhang, Qi Z <[email protected]> 
Sent: Tuesday, June 2, 2020 7:40 PM
To: Yang, Qiming <[email protected]>
Cc: [email protected]; Ye, Xiaolong <[email protected]>; Zhang, Qi Z 
<[email protected]>; Patil, Kiran <[email protected]>; Stillwell Jr, 
Paul M <[email protected]>
Subject: [PATCH 35/52] net/ice/base: correct 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

Signed-off-by: Kiran Patil <[email protected]>
Signed-off-by: Paul M. Stillwell Jr <[email protected]>
Signed-off-by: Qi Zhang <[email protected]>
---
 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 01dcace55..5c53b9ec3 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.13.6

Reply via email to