From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-170.mta1.migadu.com (out-170.mta1.migadu.com [95.215.58.170]) (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 3B4BD3F54B3 for ; Fri, 8 May 2026 14:44:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778251445; cv=none; b=FmqxHYp6xuEwQbFObstAZ+vnAKgiQ+9FETzRmPtDHYv1ENGYmLPwmPbRYYFFA5dfndQbu0Ab5J0Nq4VMN+0r5LgTTqZ9rOOqFojeUvS1Uh6JJJx82tFIVxblTdiaQaZtWMHgNu4BgPz9ebhYSsNmxkDoxulg7OvFzKnP8D6AyIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778251445; c=relaxed/simple; bh=3WkxoXC+r4Rl1Y94rA1b042nzZj8Bh/z6n5EbOPE8C8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Ag9tYRZEe+PPiMOsdaECnvyrTIKHIpVDpEJuN9kYLBJjCtMP+6DxtIwzXZ/zmvs19W/RbnrNCWWkuUKwUi5cEIltY3JfHmvJMve2hDJXlHgzicHbhfu2oqp/n25XfPtsDE8BWhWF8TgzfrWB7v3vlu6pLZUd5Gf9oZmtKbPDewg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=aIjIJ0Qe; arc=none smtp.client-ip=95.215.58.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="aIjIJ0Qe" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1778251442; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4GmxVC4Ifcuu1jEVWKibtjYgtjNUKM+Gt00LoU/JnH8=; b=aIjIJ0Qe5iUET6ElTHWr72GWlh2Az2j9iBgso/RB+5Y14Mf/F4Nb0lf0aP749b4nitcvag lI9eSCgwx4nlNYbpgxuV/IxUPQTgRfIRYoyqFvn8//rr8z34Woe/xfoSutdyBKRbeX/9l3 qrAOmI3oMXT+6Urx1XktS2y4d9CFCUg= From: Thorsten Blum To: David Howells , Marc Dionne Cc: Thorsten Blum , linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH RESEND 2/2] afs: replace goto with direct return in afs_lookup_atsys Date: Fri, 8 May 2026 16:43:29 +0200 Message-ID: <20260508144326.3566-5-thorsten.blum@linux.dev> In-Reply-To: <20260508144326.3566-4-thorsten.blum@linux.dev> References: <20260508144326.3566-4-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=897; i=thorsten.blum@linux.dev; h=from:subject; bh=3WkxoXC+r4Rl1Y94rA1b042nzZj8Bh/z6n5EbOPE8C8=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJl/v/UHhF8//PGsu0ZO/U5fucD3tv17r24vPPxaMN3iz VpO1qU1HaUsDGJcDLJiiiwPZv2Y4VtaU7nJJGInzBxWJpAhDFycAjCRNU4M/wN5lk1g+9a79Pn1 zfeqF12+M1FzmQqT3vsfi1P/dlyVWNLH8L8oetvP/PiI4oDH6fc2dCwSfyt+YKd8Y/538f+rrKy rjTkA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Return ERR_PTR(-ENOMEM) directly and remove the obsolete out_p label. Signed-off-by: Thorsten Blum --- fs/afs/dir.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 24cea4d7eadf..c236c8b4af8f 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c @@ -919,10 +919,9 @@ static struct dentry *afs_lookup_atsys(struct inode *dir, struct dentry *dentry) _enter(""); - ret = ERR_PTR(-ENOMEM); p = buf = kmalloc(AFSNAMEMAX, GFP_KERNEL); if (!buf) - goto out_p; + return ERR_PTR(-ENOMEM); if (dentry->d_name.len > 4) { memcpy(p, dentry->d_name.name, dentry->d_name.len - 4); p += dentry->d_name.len - 4; @@ -954,7 +953,6 @@ static struct dentry *afs_lookup_atsys(struct inode *dir, struct dentry *dentry) out_s: afs_put_sysnames(subs); kfree(buf); -out_p: return ret; }