ftrace: Fix selftest goto location on error
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 1 Sep 2017 16:04:09 +0000 (12:04 -0400)
committerBen Hutchings <ben@decadent.org.uk>
Sun, 26 Nov 2017 13:51:07 +0000 (13:51 +0000)
commitbf70348b602b6b39cd26cc84fb4518db507bfda6
tree1e9f6206fa23df1a60db48a7b7657f43fc765880
parent79ac778a4f68c4609e069eb965586af42dd71119
ftrace: Fix selftest goto location on error

commit 46320a6acc4fb58f04bcf78c4c942cc43b20f986 upstream.

In the second iteration of trace_selftest_ops(), the error goto label is
wrong in the case where trace_selftest_test_global_cnt is off. In the
case of error, it leaks the dynamic ops that was allocated.

Fixes: 95950c2e ("ftrace: Add self-tests for multiple function trace users")
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
[bwh: Backported to 3.2: adjust context, indentation]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/trace/trace_selftest.c