summaryrefslogtreecommitdiffstats
path: root/fs/sysfs
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 13:27:43 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-04-23 13:27:43 +0200
commite5019b14230a0bc1f6641c9850ae39cfe76ad2aa (patch)
treee3ff6870ee176d6dd1944d58a478f5db0a2fdba7 /fs/sysfs
parenttreewide: Use sysfs_bin_attr_simple_read() helper (diff)
parentLinux 6.9-rc5 (diff)
downloadlinux-e5019b14230a0bc1f6641c9850ae39cfe76ad2aa.tar.xz
linux-e5019b14230a0bc1f6641c9850ae39cfe76ad2aa.zip
Merge 6.9-rc5 into driver-core-next
We want the kernfs fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/sysfs')
-rw-r--r--fs/sysfs/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 289b57d32c89..d1995e2d6c94 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -463,6 +463,8 @@ struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj,
kn = kernfs_find_and_get(kobj->sd, attr->name);
if (kn)
kernfs_break_active_protection(kn);
+ else
+ kobject_put(kobj);
return kn;
}
EXPORT_SYMBOL_GPL(sysfs_break_active_protection);