tracing/histograms: Return an error if we fail to add histogram to hist_vars list
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH v2 1/1 tracing/histograms: Return an error if we fail to add histogram to hist_vars list
Commit 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if they have referenced variables") added a check to fail histogram creation if save_hist_vars() failed to add histogram to hist_vars list. But the commit failed to set ret to failed return code before jumping to unregister histogram, fix it.
Fixes 6018b585e8c6 ("tracing/histograms: Add histograms to hist_vars if they have referenced variables")
Signed-off-by Mohamed Khalfella <[email protected]>
--- kernel/trace/trace_events_hist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/trace/trace_events_hist.c +2 -1
@@ -6668,7 +6668,8 @@ static int event_hist_trigger_parse(struct event_command *cmd_ops, goto out_unreg;if (has_hist_vars (hist_data) || hist_data->n_var_refs) { -if (save_hist_vars (hist_data)) + ret =save_hist_vars (hist_data); +if (ret) goto out_unreg; }
Signature · 1 line
2.34.1