提交 9310f1de 编写于 作者: S Steve Lin 提交者: Jassi Brar

mailbox: bcm-pdc: PDC driver leaves debugfs files after removal

Minor fix to ensure that debugfs stats pseudo-files are
removed when driver module is unloaded.  Previously, the call to
debugfs_remove_recursive() was never being called since the
directory was not empty, and a seg fault would occur if another
process tried to access these leftover files.
Signed-off-by: NSteve Lin <steven.lin1@broadcom.com>
Signed-off-by: NRob Rice <rob.rice@broadcom.com>
Reviewed-by: NAndy Gospodarek <gospo@broadcom.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 9fb0f9ac
......@@ -492,10 +492,8 @@ static void pdc_setup_debugfs(struct pdc_state *pdcs)
static void pdc_free_debugfs(void)
{
if (debugfs_dir && simple_empty(debugfs_dir)) {
debugfs_remove_recursive(debugfs_dir);
debugfs_dir = NULL;
}
debugfs_remove_recursive(debugfs_dir);
debugfs_dir = NULL;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册