]> git.baikalelectronics.ru Git - kernel.git/commit
perf config: Refactor the code using 'ret' variable in cmd_config()
authorTaeung Song <treeze.taeung@gmail.com>
Sat, 17 Jun 2017 03:46:42 +0000 (12:46 +0900)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 20 Jun 2017 01:05:55 +0000 (22:05 -0300)
commit80541329cc353ccc19b0390c22721d4fd39acc4e
treecdec6d8a70a4ce696744be2abf8ce04caa2ebcea
parentece60d41d6b282ea7d7cf0c3abec74adeabea225
perf config: Refactor the code using 'ret' variable in cmd_config()

To simplify the code related to 'ret' variable in cmd_config(),
initialize 'ret' with -1 instead of 0 and use goto to perform resource
release at the end of the function, setting ret to zero just before the
out_err label, as usual in the kernel sources.

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Link: http://lkml.kernel.org/r/1497671202-20495-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/builtin-config.c