diff options
author | Tianjia Zhang <tianjia.zhang@linux.alibaba.com> | 2020-08-02 19:15:37 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-08-03 15:57:02 -0700 |
commit | 0470a48880f8bc42ce26962b79c7b802c5a695ec (patch) | |
tree | 9270d447a75d2a56f6683a7960cc2012b75fbb8e /drivers/net/ethernet/aquantia/atlantic | |
parent | cbbb64f62acd97429f517bd382ada9d618c8856a (diff) | |
download | linux-stable-0470a48880f8bc42ce26962b79c7b802c5a695ec.tar.gz linux-stable-0470a48880f8bc42ce26962b79c7b802c5a695ec.tar.bz2 linux-stable-0470a48880f8bc42ce26962b79c7b802c5a695ec.zip |
net: ethernet: aquantia: Fix wrong return value
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 <vomlehn@texas.net>
Signed-off-by: Tianjia Zhang <tianjia.zhang@linux.alibaba.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/aquantia/atlantic')
-rw-r--r-- | drivers/net/ethernet/aquantia/atlantic/hw_atl/hw_atl_a0.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 c38a4b8a14cb..611875ef2cd1 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 @@ -786,7 +786,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 (cfg->mc_list_count = 0U; cfg->mc_list_count < count; ++cfg->mc_list_count) { |