From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BA1E611715 for ; Mon, 11 Sep 2023 15:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3CA60C433C8; Mon, 11 Sep 2023 15:06:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1694444791; bh=0M3DeVVC5f1vcGCNMhrRxvVYnZk2wO7crc23QTzDPtQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XaDex9mm9/Wp295T3RTXXrt9GTw5PuMcSLTzG4UQlqwggSiaFPCXUg5bPkBOT4Gwd XityDAhLZwfQhTVgme5miDfqNvxIYEc9SJXFJ9CA8XcrY6wcf/WljrWVqrUAwbjtr/ c1N0NWYhYb0nmSF/gHjEj104WG8mZF0GvfvjEA0A= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Christophe JAILLET , Mark Brown , Anshuman Khandual , Will Deacon , Sasha Levin Subject: [PATCH 6.1 116/600] arm64/ptrace: Clean up error handling path in sve_set_common() Date: Mon, 11 Sep 2023 15:42:29 +0200 Message-ID: <20230911134637.032027786@linuxfoundation.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230911134633.619970489@linuxfoundation.org> References: <20230911134633.619970489@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Christophe JAILLET [ 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 Reviewed-by: Mark Brown Reviewed-by: Anshuman Khandual Link: https://lore.kernel.org/r/aa61301ed2dfd079b74b37f7fede5f179ac3087a.1689616473.git.christophe.jaillet@wanadoo.fr Signed-off-by: Will Deacon Signed-off-by: Sasha Levin --- arch/arm64/kernel/ptrace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/kernel/ptrace.c b/arch/arm64/kernel/ptrace.c index f606c942f514e..e1f6366b7ccdf 100644 --- a/arch/arm64/kernel/ptrace.c +++ b/arch/arm64/kernel/ptrace.c @@ -896,7 +896,8 @@ static int sve_set_common(struct task_struct *target, break; default: WARN_ON_ONCE(1); - return -EINVAL; + ret = -EINVAL; + goto out; } /* -- 2.40.1