2019-10-19 08:13:40

by Chen Wandun

[permalink] [raw]
Subject: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: Chenwandun <[email protected]>

add an error handling in aq_nic_set_multicast_list, it may not
work when hw_multicast_list_set error; and at the same time
it will remove gcc Wunused-but-set-variable warning.

Signed-off-by: Chenwandun <[email protected]>
---
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
index 2a18439..137c1de 100644
--- a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
+++ b/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
@@ -664,6 +664,8 @@ int aq_nic_set_multicast_list(struct aq_nic_s *self, struct net_device *ndev)
err = hw_ops->hw_multicast_list_set(self->aq_hw,
self->mc_list.ar,
self->mc_list.count);
+ if (err < 0)
+ return err;
}
return aq_nic_set_packet_filter(self, packet_filter);
}
--
2.7.4


2019-10-19 08:25:48

by Igor Russkikh

[permalink] [raw]
Subject: Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

Thanks, Chen.

On 18.10.2019 13:20, Chen Wandun wrote:
> From: Chenwandun <[email protected]>
>
> add an error handling in aq_nic_set_multicast_list, it may not
> work when hw_multicast_list_set error; and at the same time
> it will remove gcc Wunused-but-set-variable warning.
>
> Signed-off-by: Chenwandun <[email protected]>

Reviewed-by: Igor Russkikh <[email protected]>

Regards,
Igor

2019-10-19 09:10:08

by Andrew Lunn

[permalink] [raw]
Subject: Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

On Fri, Oct 18, 2019 at 06:20:37PM +0800, Chen Wandun wrote:
> From: Chenwandun <[email protected]>
>
> add an error handling in aq_nic_set_multicast_list, it may not
> work when hw_multicast_list_set error; and at the same time
> it will remove gcc Wunused-but-set-variable warning.
>
> Signed-off-by: Chenwandun <[email protected]>

Reviewed-by: Andrew Lunn <[email protected]>

Andrew

2019-10-19 19:21:55

by David Miller

[permalink] [raw]
Subject: Re: [PATCH v2] net: aquantia: add an error handling in aq_nic_set_multicast_list

From: Chen Wandun <[email protected]>
Date: Fri, 18 Oct 2019 18:20:37 +0800

> From: Chenwandun <[email protected]>
>
> add an error handling in aq_nic_set_multicast_list, it may not
> work when hw_multicast_list_set error; and at the same time
> it will remove gcc Wunused-but-set-variable warning.
>
> Signed-off-by: Chenwandun <[email protected]>

Applied, thanks.