markers: break the redundant loop in kernel/marker.c
authorZhaolei <zhaolei@cn.fujitsu.com>
Wed, 22 Oct 2008 03:38:01 +0000 (11:38 +0800)
committerIngo Molnar <mingo@elte.hu>
Mon, 27 Oct 2008 12:02:23 +0000 (13:02 +0100)
Impact: cleanup, no functionality changed

Because e->name is unique in list, we don't need to continue the iteration
after matched.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Acked-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/marker.c

index 0f2a944..2898b64 100644 (file)
@@ -825,8 +825,6 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
                        if (!e->ptype) {
                                if (num == 0 && e->single.func == probe)
                                        return e->single.probe_private;
-                               else
-                                       break;
                        } else {
                                struct marker_probe_closure *closure;
                                int match = 0;
@@ -838,6 +836,7 @@ void *marker_get_private_data(const char *name, marker_probe_func *probe,
                                                return closure[i].probe_private;
                                }
                        }
+                       break;
                }
        }
        return ERR_PTR(-ENOENT);