mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 09:31:50 +00:00
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>
This commit is contained in:
parent
099dcc1801
commit
6c610dba6e
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user