Commit 9310f1de authored by Steve Lin's avatar Steve Lin Committed by Jassi Brar
Browse files

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: default avatarSteve Lin <steven.lin1@broadcom.com>
Signed-off-by: default avatarRob Rice <rob.rice@broadcom.com>
Reviewed-by: default avatarAndy Gospodarek <gospo@broadcom.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent 9fb0f9ac
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -492,11 +492,9 @@ 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;
}
}

/**
 * pdc_build_rxd() - Build DMA descriptor to receive SPU result.