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>
Sun, 1 Dec 2019 08:13:43 +0000 (09:13 +0100)
commit156c7d83c90de9d8afd5a5bd8b4536c38bda7939
treee7f6a9f9d12098d35fa386a6bfda5f5bfb5483b9
parenta68ec8fc46c4dd9a8b123e75a7ab7bdf35cb5d65
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