[PATCH v3 05/10] ubifs: convert to kobject_del_and_put()
Yangtao Li
frank.li at vivo.com
Wed Mar 22 09:59:00 PDT 2023
Use kobject_del_and_put() to simplify code.
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael at kernel.org>
Cc: Damien Le Moal <damien.lemoal at opensource.wdc.com>
Signed-off-by: Yangtao Li <frank.li at vivo.com>
---
fs/ubifs/sysfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fs/ubifs/sysfs.c b/fs/ubifs/sysfs.c
index 1c958148bb87..9571718e61a9 100644
--- a/fs/ubifs/sysfs.c
+++ b/fs/ubifs/sysfs.c
@@ -130,8 +130,7 @@ int ubifs_sysfs_register(struct ubifs_info *c)
void ubifs_sysfs_unregister(struct ubifs_info *c)
{
- kobject_del(&c->kobj);
- kobject_put(&c->kobj);
+ kobject_del_and_put(&c->kobj);
wait_for_completion(&c->kobj_unregister);
kfree(c->stats);
--
2.35.1
More information about the linux-mtd
mailing list