From: Suraj Upadhyay Date: Thu, 16 Jul 2020 19:16:45 +0000 (+0530) Subject: net: decnet: af_decnet: Simplify goto loop. X-Git-Tag: v5.10.7~1943^2~218 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e0c3f4c4fdc0648cffedd5e70f16be7ab45340b4;p=platform%2Fkernel%2Flinux-rpi.git net: decnet: af_decnet: Simplify goto loop. Replace goto loop with while loop. Signed-off-by: Suraj Upadhyay Signed-off-by: David S. Miller --- diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 0a46ea3..7d7ae2d 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c @@ -2134,14 +2134,11 @@ static struct sock *dn_socket_get_next(struct seq_file *seq, struct dn_iter_state *state = seq->private; n = sk_next(n); -try_again: - if (n) - goto out; - if (++state->bucket >= DN_SK_HASH_SIZE) - goto out; - n = sk_head(&dn_sk_hash[state->bucket]); - goto try_again; -out: + while (!n) { + if (++state->bucket >= DN_SK_HASH_SIZE) + break; + n = sk_head(&dn_sk_hash[state->bucket]); + } return n; }