[PATCH] net: ethernet: aquantia: Fix wrong return value

Subsystems: aquantia ethernet driver (atlantic), networking drivers, the rest

STALE2213d

2 messages, 2 authors, 2020-08-03 · open the first message on its own page

[PATCH] net: ethernet: aquantia: Fix wrong return value

From: Tianjia Zhang <hidden>
Date: 2020-08-02 11:16:26

In function hw_atl_a0_hw_multicast_list_set(), when an invalid
request is encountered, a negative error code should be returned.

Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions")
Cc: David VomLehn <redacted>
Signed-off-by: Tianjia Zhang <redacted>
---
 drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
index a312864969af..6640fd35b29b 100644
--- a/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
+++ b/drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c
@@ -782,7 +782,7 @@ static int hw_atl_a0_hw_multicast_list_set(struct aq_hw_s *self,
 	int err = 0;
 
 	if (count > (HW_ATL_A0_MAC_MAX - HW_ATL_A0_MAC_MIN)) {
-		err = EBADRQC;
+		err = -EBADRQC;
 		goto err_exit;
 	}
 	for (self->aq_nic_cfg->mc_list_count = 0U;
-- 
2.26.2

Re: [PATCH] net: ethernet: aquantia: Fix wrong return value

From: David Miller <davem@davemloft.net>
Date: 2020-08-03 22:56:24

From: Tianjia Zhang <redacted>
Date: Sun,  2 Aug 2020 19:15:37 +0800
In function hw_atl_a0_hw_multicast_list_set(), when an invalid
request is encountered, a negative error code should be returned.

Fixes: bab6de8fd180b ("net: ethernet: aquantia: Atlantic A0 and B0 specific functions")
Cc: David VomLehn <redacted>
Signed-off-by: Tianjia Zhang <redacted>
Applied, thank you!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help