perf jevents: Tidy error handling
authorJohn Garry <john.garry@huawei.com>
Thu, 22 Oct 2020 11:02:26 +0000 (19:02 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Oct 2021 08:04:27 +0000 (10:04 +0200)
commit40a84fcae2bf3003cc4f84ea8d6040838031f7ff
tree3ee5d848fcad301650a8624b1c670c49e63ddc01
parent628b31d96711ebacca39a961ee676861ec2d63d0
perf jevents: Tidy error handling

[ Upstream commit fa1b41a74d1136cbdd6960f36d7b9c7aa35c8139 ]

There is much duplication in the error handling for directory transvering
for prcessing JSONs.

Factor out the common code to tidy a bit.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-By: Kajol Jain<kjain@linux.ibm.com>
Link: https://lore.kernel.org/r/1603364547-197086-2-git-send-email-john.garry@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/perf/pmu-events/jevents.c