[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250926-v9fs_misc-v1-3-a8b3907fc04d@codewreck.org>
Date: Fri, 26 Sep 2025 18:27:31 +0900
From: Dominique Martinet via B4 Relay <devnull+asmadeus.codewreck.org@...nel.org>
To: "Randall P. Embry" <rpembry@...il.com>,
Eric Van Hensbergen <ericvh@...nel.org>,
Latchesar Ionkov <lucho@...kov.net>,
Christian Schoenebeck <linux_oss@...debyte.com>
Cc: v9fs@...ts.linux.dev, linux-kernel@...r.kernel.org,
Dominique Martinet <asmadeus@...ewreck.org>
Subject: [PATCH 3/3] 9p: sysfs_init: don't hardcode error to ENOMEM
From: "Randall P. Embry" <rpembry@...il.com>
v9fs_sysfs_init() always returned -ENOMEM on failure;
return the actual sysfs_create_group() error instead.
Signed-off-by: Randall P. Embry <rpembry@...il.com>
Signed-off-by: Dominique Martinet <asmadeus@...ewreck.org>
---
fs/9p/v9fs.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 4d289c56578fb15e45d8e94a264977898973cb31..a020a8f00a1ac074e826a728c5a2b1ef09ec87fd 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -596,13 +596,16 @@ static const struct attribute_group v9fs_attr_group = {
static int __init v9fs_sysfs_init(void)
{
+ int ret;
+
v9fs_kobj = kobject_create_and_add("9p", fs_kobj);
if (!v9fs_kobj)
return -ENOMEM;
- if (sysfs_create_group(v9fs_kobj, &v9fs_attr_group)) {
+ ret = sysfs_create_group(v9fs_kobj, &v9fs_attr_group);
+ if (ret) {
kobject_put(v9fs_kobj);
- return -ENOMEM;
+ return ret;
}
return 0;
--
2.51.0
Powered by blists - more mailing lists