perf/x86/intel/uncore: Clean up error handling path of iio mapping
authorKan Liang <kan.liang@linux.intel.com>
Thu, 24 Jun 2021 18:17:57 +0000 (11:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Jul 2021 12:36:17 +0000 (14:36 +0200)
commit7412c988fe123a064d67778611a5e40fd50bfd20
tree28a16d5ed49f0cb346a65ff1ab07473cedf69091
parent892387e7619ecb339dd43c4ab916256d6c4c0001
perf/x86/intel/uncore: Clean up error handling path of iio mapping

[ Upstream commit d4ba0b06306a70c99a43f9d452886a86e2d3bd26 ]

The error handling path of iio mapping looks fragile. We already fixed
one issue caused by it, commit f797f05d917f ("perf/x86/intel/uncore:
Fix for iio mapping on Skylake Server"). Clean up the error handling
path and make the code robust.

Reported-by: gushengxian <gushengxian@yulong.com>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/40e66cf9-398b-20d7-ce4d-433be6e08921@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/events/intel/uncore_snbep.c