perf probe: Fix to delete multiple probe event
[linux-2.6-block.git] / tools / perf / util / probe-file.c
index 0f5fda11675fbd46256e5a46c8c61eb3a121f125..8c852948513e35c95bef548f040f7561d4e68ecb 100644 (file)
@@ -206,6 +206,9 @@ static struct strlist *__probe_file__get_namelist(int fd, bool include_group)
                } else
                        ret = strlist__add(sl, tev.event);
                clear_probe_trace_event(&tev);
+               /* Skip if there is same name multi-probe event in the list */
+               if (ret == -EEXIST)
+                       ret = 0;
                if (ret < 0)
                        break;
        }