From: Li Zefan Date: Tue, 1 Apr 2008 04:29:34 +0000 (+0800) Subject: [IA64] use goto to jump out do/while_each_thread X-Git-Tag: firefly_0821_release~21623^2^2~10 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6794c7526651160a75e90322cb750dcceb310d34;p=firefly-linux-kernel-4.4.55.git [IA64] use goto to jump out do/while_each_thread do_each_thread/while_each_thread is a double loop, so should use 'goto' rather than 'break' to break out the loop. Signed-off-by: Li Zefan Signed-off-by: Tony Luck --- diff --git a/arch/ia64/kernel/perfmon.c b/arch/ia64/kernel/perfmon.c index a2aabfdc80d9..d1d24f4598da 100644 --- a/arch/ia64/kernel/perfmon.c +++ b/arch/ia64/kernel/perfmon.c @@ -4204,10 +4204,10 @@ pfm_check_task_exist(pfm_context_t *ctx) do_each_thread (g, t) { if (t->thread.pfm_context == ctx) { ret = 0; - break; + goto out; } } while_each_thread (g, t); - +out: read_unlock(&tasklist_lock); DPRINT(("pfm_check_task_exist: ret=%d ctx=%p\n", ret, ctx));