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 2/2] afs: replace goto with direct return in afs_lookup_atsys
Date: Tue, 24 Mar 2026 16:45:18 +0100 [thread overview]
Message-ID: <20260324154515.205796-6-thorsten.blum@linux.dev> (raw)
In-Reply-To: <20260324154515.205796-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 89d5c9c354d4..aec16ceebd94 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;
}
prev parent reply other threads:[~2026-03-24 15:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 15:45 [PATCH 1/2] afs: replace deprecated strcpy with strscpy in afs_lookup_atsys Thorsten Blum
2026-03-24 15:45 ` Thorsten Blum [this message]
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=20260324154515.205796-6-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox