Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1212117
| From | Tomas Winkler <tomas.winkler@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [char-misc 2/2] mei: fix debugfs files leak on error path |
| Date | 2015-08-24 14:30 +0200 |
| Message-ID | <q0Z2X-7BA-11@gated-at.bofh.it> (permalink) |
| References | <q0Z2W-7BA-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
if dbgfs_dir is not set then debugfs_remove_recursive
is not called on the error path
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
---
drivers/misc/mei/debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/misc/mei/debugfs.c b/drivers/misc/mei/debugfs.c
index c157f0ba575c..a138d8a27ab5 100644
--- a/drivers/misc/mei/debugfs.c
+++ b/drivers/misc/mei/debugfs.c
@@ -204,6 +204,8 @@ int mei_dbgfs_register(struct mei_device *dev, const char *name)
if (!dir)
return -ENOMEM;
+ dev->dbgfs_dir = dir;
+
f = debugfs_create_file("meclients", S_IRUSR, dir,
dev, &mei_dbgfs_fops_meclients);
if (!f) {
@@ -228,7 +230,6 @@ int mei_dbgfs_register(struct mei_device *dev, const char *name)
dev_err(dev->dev, "allow_fixed_address: registration failed\n");
goto err;
}
- dev->dbgfs_dir = dir;
return 0;
err:
mei_dbgfs_deregister(dev);
--
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[char-misc 1/2] mei: Fix debugfs filename in error output Tomas Winkler <tomas.winkler@intel.com> - 2015-08-24 14:30 +0200 [char-misc 2/2] mei: fix debugfs files leak on error path Tomas Winkler <tomas.winkler@intel.com> - 2015-08-24 14:30 +0200
csiph-web