Skip to content

Commit e12c225

Browse files
Huazhong Tandavem330
authored andcommitted
net: hns3: bugfix for not checking return value
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: 7fa6be4 ("net: hns3: fix incorrect return value/type of some functions") Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent b25ddb0 commit e12c225

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/net/ethernet/hisilicon/hns3/hns3_enet.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3760,7 +3760,8 @@ static int hns3_reset_notify_init_enet(struct hnae3_handle *handle)
37603760
/* Hardware table is only clear when pf resets */
37613761
if (!(handle->flags & HNAE3_SUPPORT_VF)) {
37623762
ret = hns3_restore_vlan(netdev);
3763-
return ret;
3763+
if (ret)
3764+
return ret;
37643765
}
37653766

37663767
ret = hns3_restore_fd_rules(netdev);

0 commit comments

Comments
 (0)