tracepoints: use unregister return value
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 14 Nov 2008 22:47:44 +0000 (17:47 -0500)
committerIngo Molnar <mingo@elte.hu>
Sun, 16 Nov 2008 08:01:33 +0000 (09:01 +0100)
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>
include/linux/tracepoint.h

index 69648c54a326059429e84624e10c485082684508..c60a791f8874010d03f6dc7c13c13e5b3e14e9d9 100644 (file)
@@ -73,9 +73,9 @@ struct tracepoint {
                return tracepoint_probe_register(#name ":" #proto,      \
                        (void *)probe);                                 \
        }                                                               \
-       static inline void unregister_trace_##name(void (*probe)(proto))\
+       static inline int unregister_trace_##name(void (*probe)(proto)) \
        {                                                               \
-               tracepoint_probe_unregister(#name ":" #proto,           \
+               return tracepoint_probe_unregister(#name ":" #proto,    \
                        (void *)probe);                                 \
        }
 
@@ -92,8 +92,10 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
        {                                                               \
                return -ENOSYS;                                         \
        }                                                               \
-       static inline void unregister_trace_##name(void (*probe)(proto))\
-       { }
+       static inline int unregister_trace_##name(void (*probe)(proto)) \
+       {                                                               \
+               return -ENOSYS;                                         \
+       }
 
 static inline void tracepoint_update_probe_range(struct tracepoint *begin,
        struct tracepoint *end)