summaryrefslogtreecommitdiff
path: root/kernel/trace
diff options
context:
space:
mode:
authorHyeonggon Yoo <42.hyeyoo@gmail.com>2021-05-29 15:14:23 +0900
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-06-10 11:16:20 -0400
commit6c610dba6e2beb1a16ac309672181d0090fb8d30 (patch)
treef977b64b327e2a5d1c03a487ae332f37a35936ae /kernel/trace
parent099dcc1801d981260aee9496dbeb55270dca70c1 (diff)
tracing: Add WARN_ON_ONCE when returned value is negative
ret is assigned return value of event_hist_trigger_func, but the value is unused. It is better to warn when returned value is negative, rather than just ignoring it. Link: https://lkml.kernel.org/r/20210529061423.GA103954@hyeyoo Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace_events_hist.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/trace/trace_events_hist.c b/kernel/trace/trace_events_hist.c
index dacd6fe0f60c..ba03b7d84fc2 100644
--- a/kernel/trace/trace_events_hist.c
+++ b/kernel/trace/trace_events_hist.c
@@ -5232,6 +5232,7 @@ static void unregister_field_var_hists(struct hist_trigger_data *hist_data)
cmd = hist_data->field_var_hists[i]->cmd;
ret = event_hist_trigger_func(&trigger_hist_cmd, file,
"!hist", "hist", cmd);
+ WARN_ON_ONCE(ret < 0);
}
}