diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/tipc/name_table.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c index 7d85cc1ace0e..46e6b6c2ecc9 100644 --- a/net/tipc/name_table.c +++ b/net/tipc/name_table.c | |||
@@ -574,14 +574,13 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode) | |||
574 | cluster_list); | 574 | cluster_list); |
575 | list_move_tail(&publ->cluster_list, | 575 | list_move_tail(&publ->cluster_list, |
576 | &info->cluster_list); | 576 | &info->cluster_list); |
577 | } else if (!list_empty(&info->zone_list)) { | 577 | } else { |
578 | publ = list_first_entry(&info->zone_list, | 578 | publ = list_first_entry(&info->zone_list, |
579 | struct publication, | 579 | struct publication, |
580 | zone_list); | 580 | zone_list); |
581 | list_move_tail(&publ->zone_list, | 581 | list_move_tail(&publ->zone_list, |
582 | &info->zone_list); | 582 | &info->zone_list); |
583 | } else | 583 | } |
584 | goto no_match; | ||
585 | } | 584 | } |
586 | 585 | ||
587 | /* Round-Robin Algorithm: */ | 586 | /* Round-Robin Algorithm: */ |
@@ -598,8 +597,6 @@ u32 tipc_nametbl_translate(u32 type, u32 instance, u32 *destnode) | |||
598 | cluster_list); | 597 | cluster_list); |
599 | list_move_tail(&publ->cluster_list, &info->cluster_list); | 598 | list_move_tail(&publ->cluster_list, &info->cluster_list); |
600 | } else { | 599 | } else { |
601 | if (list_empty(&info->zone_list)) | ||
602 | goto no_match; | ||
603 | publ = list_first_entry(&info->zone_list, struct publication, | 600 | publ = list_first_entry(&info->zone_list, struct publication, |
604 | zone_list); | 601 | zone_list); |
605 | list_move_tail(&publ->zone_list, &info->zone_list); | 602 | list_move_tail(&publ->zone_list, &info->zone_list); |