diff options
Diffstat (limited to 'net/ipv6/mcast.c')
-rw-r--r-- | net/ipv6/mcast.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index 3017c4a83ccc..fac1f27e428e 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
@@ -226,7 +226,7 @@ int ipv6_sock_mc_drop(struct sock *sk, int ifindex, const struct in6_addr *addr) | |||
226 | *lnk = mc_lst->next; | 226 | *lnk = mc_lst->next; |
227 | 227 | ||
228 | dev = __dev_get_by_index(net, mc_lst->ifindex); | 228 | dev = __dev_get_by_index(net, mc_lst->ifindex); |
229 | if (dev != NULL) { | 229 | if (dev) { |
230 | struct inet6_dev *idev = __in6_dev_get(dev); | 230 | struct inet6_dev *idev = __in6_dev_get(dev); |
231 | 231 | ||
232 | (void) ip6_mc_leave_src(sk, mc_lst, idev); | 232 | (void) ip6_mc_leave_src(sk, mc_lst, idev); |
@@ -2611,7 +2611,7 @@ static struct ifmcaddr6 *igmp6_mc_get_next(struct seq_file *seq, struct ifmcaddr | |||
2611 | 2611 | ||
2612 | im = im->next; | 2612 | im = im->next; |
2613 | while (!im) { | 2613 | while (!im) { |
2614 | if (likely(state->idev != NULL)) | 2614 | if (likely(state->idev)) |
2615 | read_unlock_bh(&state->idev->lock); | 2615 | read_unlock_bh(&state->idev->lock); |
2616 | 2616 | ||
2617 | state->dev = next_net_device_rcu(state->dev); | 2617 | state->dev = next_net_device_rcu(state->dev); |
@@ -2657,7 +2657,7 @@ static void igmp6_mc_seq_stop(struct seq_file *seq, void *v) | |||
2657 | { | 2657 | { |
2658 | struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); | 2658 | struct igmp6_mc_iter_state *state = igmp6_mc_seq_private(seq); |
2659 | 2659 | ||
2660 | if (likely(state->idev != NULL)) { | 2660 | if (likely(state->idev)) { |
2661 | read_unlock_bh(&state->idev->lock); | 2661 | read_unlock_bh(&state->idev->lock); |
2662 | state->idev = NULL; | 2662 | state->idev = NULL; |
2663 | } | 2663 | } |
@@ -2726,10 +2726,10 @@ static inline struct ip6_sf_list *igmp6_mcf_get_first(struct seq_file *seq) | |||
2726 | continue; | 2726 | continue; |
2727 | read_lock_bh(&idev->lock); | 2727 | read_lock_bh(&idev->lock); |
2728 | im = idev->mc_list; | 2728 | im = idev->mc_list; |
2729 | if (likely(im != NULL)) { | 2729 | if (likely(im)) { |
2730 | spin_lock_bh(&im->mca_lock); | 2730 | spin_lock_bh(&im->mca_lock); |
2731 | psf = im->mca_sources; | 2731 | psf = im->mca_sources; |
2732 | if (likely(psf != NULL)) { | 2732 | if (likely(psf)) { |
2733 | state->im = im; | 2733 | state->im = im; |
2734 | state->idev = idev; | 2734 | state->idev = idev; |
2735 | break; | 2735 | break; |
@@ -2750,7 +2750,7 @@ static struct ip6_sf_list *igmp6_mcf_get_next(struct seq_file *seq, struct ip6_s | |||
2750 | spin_unlock_bh(&state->im->mca_lock); | 2750 | spin_unlock_bh(&state->im->mca_lock); |
2751 | state->im = state->im->next; | 2751 | state->im = state->im->next; |
2752 | while (!state->im) { | 2752 | while (!state->im) { |
2753 | if (likely(state->idev != NULL)) | 2753 | if (likely(state->idev)) |
2754 | read_unlock_bh(&state->idev->lock); | 2754 | read_unlock_bh(&state->idev->lock); |
2755 | 2755 | ||
2756 | state->dev = next_net_device_rcu(state->dev); | 2756 | state->dev = next_net_device_rcu(state->dev); |
@@ -2804,11 +2804,11 @@ static void igmp6_mcf_seq_stop(struct seq_file *seq, void *v) | |||
2804 | __releases(RCU) | 2804 | __releases(RCU) |
2805 | { | 2805 | { |
2806 | struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); | 2806 | struct igmp6_mcf_iter_state *state = igmp6_mcf_seq_private(seq); |
2807 | if (likely(state->im != NULL)) { | 2807 | if (likely(state->im)) { |
2808 | spin_unlock_bh(&state->im->mca_lock); | 2808 | spin_unlock_bh(&state->im->mca_lock); |
2809 | state->im = NULL; | 2809 | state->im = NULL; |
2810 | } | 2810 | } |
2811 | if (likely(state->idev != NULL)) { | 2811 | if (likely(state->idev)) { |
2812 | read_unlock_bh(&state->idev->lock); | 2812 | read_unlock_bh(&state->idev->lock); |
2813 | state->idev = NULL; | 2813 | state->idev = NULL; |
2814 | } | 2814 | } |