Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1245286
| From | Tan Xiaojun <tanxiaojun@huawei.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] EDAC: use debugfs_remove_recursive instead of debugfs_remove |
| Date | 2015-10-13 04:20 +0200 |
| Message-ID | <qiXm3-XV-9@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
debugfs_remove is used to remove a file or an empty directory from the debugfs filesystem, but mci->debugfs is not empty. This is not easily discovered, because debugfs_remove return nothing when failed. Reported-by: Yun Wu (Abel) <wuyun.wu@huawei.com> Signed-off-by: Tan Xiaojun <tanxiaojun@huawei.com> --- drivers/edac/edac_mc_sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 33df7d9..292e806 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -956,7 +956,7 @@ static int edac_create_debug_nodes(struct mem_ctl_info *mci) mci->debugfs = parent; return 0; nomem: - debugfs_remove(mci->debugfs); + debugfs_remove_recursive(mci->debugfs); return -ENOMEM; } #endif @@ -1070,7 +1070,7 @@ void edac_remove_sysfs_mci_device(struct mem_ctl_info *mci) edac_dbg(0, "\n"); #ifdef CONFIG_EDAC_DEBUG - debugfs_remove(mci->debugfs); + debugfs_remove_recursive(mci->debugfs); #endif #ifdef CONFIG_EDAC_LEGACY_SYSFS edac_delete_csrow_objects(mci); -- 2.5.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 — Next in thread | Find similar | Unroll thread
[PATCH] EDAC: use debugfs_remove_recursive instead of debugfs_remove Tan Xiaojun <tanxiaojun@huawei.com> - 2015-10-13 04:20 +0200
Re: [PATCH] EDAC: use debugfs_remove_recursive instead of debugfs_remove Borislav Petkov <bp@alien8.de> - 2015-10-13 10:10 +0200
Re: [PATCH] EDAC: use debugfs_remove_recursive instead of debugfs_remove Tan Xiaojun <tanxiaojun@huawei.com> - 2015-10-13 10:50 +0200
Re: [PATCH] EDAC: use debugfs_remove_recursive instead of debugfs_remove Borislav Petkov <bp@alien8.de> - 2015-10-13 12:10 +0200
csiph-web