Skip to content

Commit

Permalink
tracepoints: use unregister return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mathieu Desnoyers authored and Ingo Molnar committed Nov 16, 2008
1 parent da7b3ea commit c420970
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions include/linux/tracepoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
}

Expand All @@ -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)
Expand Down

0 comments on commit c420970

Please sign in to comment.