All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thorsten Blum <thorsten.blum@linux.dev>
To: David Howells <dhowells@redhat.com>,
	Marc Dionne <marc.dionne@auristor.com>
Cc: Thorsten Blum <thorsten.blum@linux.dev>,
	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: Sat,  6 Jun 2026 23:23:17 +0200	[thread overview]
Message-ID: <20260606212315.21574-5-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260606212315.21574-4-thorsten.blum@linux.dev>

Return ERR_PTR(-ENOMEM) directly and remove the obsolete out_p label.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 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 080664b67861..bc50f00c0c69 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -906,10 +906,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;
@@ -941,7 +940,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;
 }
 

  reply	other threads:[~2026-06-06 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-06 21:23 [PATCH RESEND 1/2] afs: replace deprecated strcpy with strscpy in afs_lookup_atsys Thorsten Blum
2026-06-06 21:23 ` Thorsten Blum [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-05-08 14:43 Thorsten Blum
2026-05-08 14:43 ` [PATCH RESEND 2/2] afs: replace goto with direct return " Thorsten Blum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260606212315.21574-5-thorsten.blum@linux.dev \
    --to=thorsten.blum@linux.dev \
    --cc=dhowells@redhat.com \
    --cc=linux-afs@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.dionne@auristor.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.