diff options
Diffstat (limited to 'fs/sysfs')
-rw-r--r-- | fs/sysfs/file.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index 96d0da65e..f51b23968 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -429,6 +429,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); |