* [Patch net] net: hns3: bugfix for not checking return value
@ 2018-11-08 2:13 Huazhong Tan
2018-11-09 0:24 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Huazhong Tan @ 2018-11-08 2:13 UTC (permalink / raw)
To: davem; +Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm
hns3_reset_notify_init_enet() only return error early if the return
value of hns3_restore_vlan() is not 0.
This patch adds checking for the return value of hns3_restore_vlan.
Fixes: 7fa6be4fd2f6 ("net: hns3: fix incorrect return value/type of some functions")
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 3f96aa3..20fcf0d 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -3760,7 +3760,8 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle)
/* Hardware table is only clear when pf resets */
if (!(handle->flags & HNAE3_SUPPORT_VF)) {
ret = hns3_restore_vlan(netdev);
- return ret;
+ if (ret)
+ return ret;
}
ret = hns3_restore_fd_rules(netdev);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Patch net] net: hns3: bugfix for not checking return value
2018-11-08 2:13 [Patch net] net: hns3: bugfix for not checking return value Huazhong Tan
@ 2018-11-09 0:24 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-11-09 0:24 UTC (permalink / raw)
To: tanhuazhong; +Cc: netdev, linux-kernel, salil.mehta, yisen.zhuang, linuxarm
From: Huazhong Tan <tanhuazhong@huawei.com>
Date: Thu, 8 Nov 2018 10:13:19 +0800
> hns3_reset_notify_init_enet() only return error early if the return
> value of hns3_restore_vlan() is not 0.
>
> This patch adds checking for the return value of hns3_restore_vlan.
>
> Fixes: 7fa6be4fd2f6 ("net: hns3: fix incorrect return value/type of some functions")
> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-09 0:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-08 2:13 [Patch net] net: hns3: bugfix for not checking return value Huazhong Tan
2018-11-09 0:24 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).