aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlabel/netlabel_unlabeled.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/netlabel/netlabel_unlabeled.c')
-rw-r--r--net/netlabel/netlabel_unlabeled.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index e8a5c32b0f10..90c8506a0aac 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -574,9 +574,10 @@ static int netlbl_unlhsh_remove_addr4(struct net *net,
574 list_entry = netlbl_af4list_remove(addr->s_addr, mask->s_addr, 574 list_entry = netlbl_af4list_remove(addr->s_addr, mask->s_addr,
575 &iface->addr4_list); 575 &iface->addr4_list);
576 spin_unlock(&netlbl_unlhsh_lock); 576 spin_unlock(&netlbl_unlhsh_lock);
577 if (list_entry == NULL) 577 if (list_entry != NULL)
578 entry = netlbl_unlhsh_addr4_entry(list_entry);
579 else
578 ret_val = -ENOENT; 580 ret_val = -ENOENT;
579 entry = netlbl_unlhsh_addr4_entry(list_entry);
580 581
581 audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, 582 audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
582 audit_info); 583 audit_info);
@@ -634,9 +635,10 @@ static int netlbl_unlhsh_remove_addr6(struct net *net,
634 spin_lock(&netlbl_unlhsh_lock); 635 spin_lock(&netlbl_unlhsh_lock);
635 list_entry = netlbl_af6list_remove(addr, mask, &iface->addr6_list); 636 list_entry = netlbl_af6list_remove(addr, mask, &iface->addr6_list);
636 spin_unlock(&netlbl_unlhsh_lock); 637 spin_unlock(&netlbl_unlhsh_lock);
637 if (list_entry == NULL) 638 if (list_entry != NULL)
639 entry = netlbl_unlhsh_addr6_entry(list_entry);
640 else
638 ret_val = -ENOENT; 641 ret_val = -ENOENT;
639 entry = netlbl_unlhsh_addr6_entry(list_entry);
640 642
641 audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL, 643 audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_STCDEL,
642 audit_info); 644 audit_info);