s390/perf: Return error when debug_register fails
authorThomas Richter <tmricht@linux.ibm.com>
Mon, 15 Oct 2018 13:39:29 +0000 (14:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Nov 2019 17:28:32 +0000 (18:28 +0100)
commit014787bb261f41f83d3111124a0d55883e60095f
treea5619e9f789ec91daf49e2960dd83367b17ad0c6
parent2d10957150d6c852af547ab46ce85e25e6c0f2f3
s390/perf: Return error when debug_register fails

[ Upstream commit ec0c0bb489727de0d4dca6a00be6970ab8a3b30a ]

Return an error when the function debug_register() fails allocating
the debug handle.
Also remove the registered debug handle when the initialization fails
later on.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/kernel/perf_cpum_sf.c