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>
This commit is contained in:
committed by
Ingo Molnar
parent
da7b3eab16
commit
c420970ef4
@@ -73,9 +73,9 @@ struct tracepoint {
|
|||||||
return tracepoint_probe_register(#name ":" #proto, \
|
return tracepoint_probe_register(#name ":" #proto, \
|
||||||
(void *)probe); \
|
(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); \
|
(void *)probe); \
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,8 +92,10 @@ extern void tracepoint_update_probe_range(struct tracepoint *begin,
|
|||||||
{ \
|
{ \
|
||||||
return -ENOSYS; \
|
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,
|
static inline void tracepoint_update_probe_range(struct tracepoint *begin,
|
||||||
struct tracepoint *end)
|
struct tracepoint *end)
|
||||||
|
Reference in New Issue
Block a user