diff options
author | Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> | 2008-11-14 17:47:44 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-16 03:01:33 -0500 |
commit | c420970ef476d7d68df119711700666224001f43 (patch) | |
tree | c10ebb11a03199f99d779472037bd49129b43abb /include/linux | |
parent | da7b3eab167091693ad215ad7692f7d0d24d1356 (diff) |
tracepoints: use unregister return value
Impact: bugfix.
Unregistering a tracepoint can fail. Return the error value.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/tracepoint.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/linux/tracepoint.h b/include/linux/tracepoint.h index 69648c54a326..c60a791f8874 100644 --- a/include/linux/tracepoint.h +++ b/include/linux/tracepoint.h | |||
@@ -73,9 +73,9 @@ struct tracepoint { | |||
73 | return tracepoint_probe_register(#name ":" #proto, \ | 73 | return tracepoint_probe_register(#name ":" #proto, \ |
74 | (void *)probe); \ | 74 | (void *)probe); \ |
75 | } \ | 75 | } \ |
76 | static inline void unregister_trace_##name(void (*probe)(proto))\ | 76 | static inline int unregister_trace_##name(void (*probe)(proto)) \ |
77 | { \ | 77 | { \ |
78 | tracepoint_probe_unregister(#name ":" #proto, \ | 78 | return tracepoint_probe_unregister(#name ":" #proto, \ |
79 | (void *)probe); \ | 79 | (void *)probe); \ |
80 | } | 80 | } |
81 | 81 | ||
@@ -92,8 +92,10 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin, | |||
92 | { \ | 92 | { \ |
93 | return -ENOSYS; \ | 93 | return -ENOSYS; \ |
94 | } \ | 94 | } \ |
95 | static inline void unregister_trace_##name(void (*probe)(proto))\ | 95 | static inline int unregister_trace_##name(void (*probe)(proto)) \ |
96 | { } | 96 | { \ |
97 | return -ENOSYS; \ | ||
98 | } | ||
97 | 99 | ||
98 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, | 100 | static inline void tracepoint_update_probe_range(struct tracepoint *begin, |
99 | struct tracepoint *end) | 101 | struct tracepoint *end) |