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)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Fri, 19 Oct 2018 06:18:16 +0000 (08:18 +0200)
commitec0c0bb489727de0d4dca6a00be6970ab8a3b30a
tree5908c5ad0061135bc5949cc6e09e375ec1e5613a
parentb5130dc2224d1881f24224c0590c6d97f2168d6a
s390/perf: Return error when debug_register fails

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>
arch/s390/kernel/perf_cpum_sf.c