]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
arm64/ptrace: Clean up error handling path in sve_set_common()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 17 Jul 2023 17:55:05 +0000 (19:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:58 +0000 (09:47 +0200)
[ Upstream commit 5f69ca4229c7d8e23f238174827ee7aa49b0bcb2 ]

All error handling paths go to 'out', except this one. Be consistent and
also branch to 'out' here.

Fixes: e12310a0d30f ("arm64/sme: Implement ptrace support for streaming mode SVE registers")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
Link: https://lore.kernel.org/r/aa61301ed2dfd079b74b37f7fede5f179ac3087a.1689616473.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/arm64/kernel/ptrace.c

index 187aa2b175b4f68abd9a81ca84e653a975fa7743..20d7ef82de90aa729c99224cbbc88b32f8e03f15 100644 (file)
@@ -891,7 +891,8 @@ static int sve_set_common(struct task_struct *target,
                        break;
                default:
                        WARN_ON_ONCE(1);
-                       return -EINVAL;
+                       ret = -EINVAL;
+                       goto out;
                }
 
                /*