Skip to content

Commit f4307b4

Browse files
Ye Binstorulf
authored andcommitted
mmc: mmc_test: Fix removal of debugfs file
In __mmc_test_register_dbgfs_file(), we need to assign 'file', as it's being used when removing the debugfs files when the mmc_test module is removed. Fixes: a04c50a ("mmc: core: no need to check return value of debugfs_create functions") Signed-off-by: Ye Bin <[email protected]> Acked-by: Adrian Hunter <[email protected]> Cc: [email protected] [Ulf: Re-wrote the commit msg] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Ulf Hansson <[email protected]>
1 parent a3cab1d commit f4307b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/mmc/core/mmc_test.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3179,7 +3179,8 @@ static int __mmc_test_register_dbgfs_file(struct mmc_card *card,
31793179
struct mmc_test_dbgfs_file *df;
31803180

31813181
if (card->debugfs_root)
3182-
debugfs_create_file(name, mode, card->debugfs_root, card, fops);
3182+
file = debugfs_create_file(name, mode, card->debugfs_root,
3183+
card, fops);
31833184

31843185
df = kmalloc(sizeof(*df), GFP_KERNEL);
31853186
if (!df) {

0 commit comments

Comments
 (0)