diff options
author | Steve Lin <steven.lin1@broadcom.com> | 2016-11-14 19:25:57 +0100 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2016-12-19 15:40:19 +0100 |
commit | 9310f1ded44067b2da61fa0471ca5b7768dd28ae (patch) | |
tree | 5ca14a8d0da8ff54d17d2981ac9151a883f248fd /drivers/mailbox | |
parent | mailbox: bcm-pdc: Changes so mbox client can be removed / re-inserted (diff) | |
download | linux-9310f1ded44067b2da61fa0471ca5b7768dd28ae.tar.xz linux-9310f1ded44067b2da61fa0471ca5b7768dd28ae.zip |
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: Steve Lin <steven.lin1@broadcom.com>
Signed-off-by: Rob Rice <rob.rice@broadcom.com>
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r-- | drivers/mailbox/bcm-pdc-mailbox.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mailbox/bcm-pdc-mailbox.c b/drivers/mailbox/bcm-pdc-mailbox.c index 3b4ebbe81964..c9434a756bf3 100644 --- a/drivers/mailbox/bcm-pdc-mailbox.c +++ b/drivers/mailbox/bcm-pdc-mailbox.c @@ -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; } /** |