summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_sysfs.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-11-25 19:16:05 +0000
committerMark Brown <broonie@kernel.org>2022-11-25 19:16:05 +0000
commit5cd4d3886780bf9a846eada29a2aefe8bfcac027 (patch)
treeea5cc9b11657912a1371932ad467a7a622e8010c /fs/xfs/xfs_sysfs.h
parentef3232e3dbd172fa17190fa8a852a3180a73bbdc (diff)
parentf0c4d9fc9cc9462659728d168387191387e903cc (diff)
downloadlinux-5cd4d3886780bf9a846eada29a2aefe8bfcac027.tar.gz
linux-5cd4d3886780bf9a846eada29a2aefe8bfcac027.tar.bz2
linux-5cd4d3886780bf9a846eada29a2aefe8bfcac027.zip
Merge tag 'v6.1-rc4' into spi-6.2
Linux 6.1-rc4 which should get my CI working on RPi3s again.
Diffstat (limited to 'fs/xfs/xfs_sysfs.h')
-rw-r--r--fs/xfs/xfs_sysfs.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_sysfs.h b/fs/xfs/xfs_sysfs.h
index 43585850f154..513095e353a5 100644
--- a/fs/xfs/xfs_sysfs.h
+++ b/fs/xfs/xfs_sysfs.h
@@ -33,10 +33,15 @@ xfs_sysfs_init(
const char *name)
{
struct kobject *parent;
+ int err;
parent = parent_kobj ? &parent_kobj->kobject : NULL;
init_completion(&kobj->complete);
- return kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name);
+ err = kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name);
+ if (err)
+ kobject_put(&kobj->kobject);
+
+ return err;
}
static inline void