From: Colin Ian King <colin.i.king@gmail.com>
To: Eric Van Hensbergen <ericvh@kernel.org>,
Latchesar Ionkov <lucho@ionkov.net>,
Dominique Martinet <asmadeus@codewreck.org>,
Christian Schoenebeck <linux_oss@crudebyte.com>,
v9fs@lists.linux.dev
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][next] fs/9p: remove redundant variable ret
Date: Wed, 6 Nov 2024 15:22:09 +0000 [thread overview]
Message-ID: <20241106152209.1626630-1-colin.i.king@gmail.com> (raw)
The assignments and return checks on ret are redundant. Clean up
the code by just returning the return value from the call to
v9fs_init_inode_cache.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
fs/9p/v9fs.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 281a1ed03a04..ee0a374e0d9d 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -661,12 +661,7 @@ static void v9fs_destroy_inode_cache(void)
static int v9fs_cache_register(void)
{
- int ret;
-
- ret = v9fs_init_inode_cache();
- if (ret < 0)
- return ret;
- return ret;
+ return v9fs_init_inode_cache();
}
static void v9fs_cache_unregister(void)
--
2.39.5
next reply other threads:[~2024-11-06 15:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-06 15:22 Colin Ian King [this message]
2024-11-06 21:45 ` Dan Carpenter
2024-11-06 22:54 ` Dominique Martinet
2024-11-07 9:14 ` Colin King (gmail)
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=20241106152209.1626630-1-colin.i.king@gmail.com \
--to=colin.i.king@gmail.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_oss@crudebyte.com \
--cc=lucho@ionkov.net \
--cc=v9fs@lists.linux.dev \
/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
all inboxes | Powered by JetHome®