Commit f4307b4d authored by Ye Bin's avatar Ye Bin Committed by Ulf Hansson

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: a04c50aa ("mmc: core: no need to check return value of debugfs_create functions")
Signed-off-by: default avatarYe Bin <yebin10@huawei.com>
Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
Cc: stable@vger.kernel.org
[Ulf: Re-wrote the commit msg]
Link: https://lore.kernel.org/r/20221123095506.1965691-1-yebin@huaweicloud.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent a3cab1d2
...@@ -3179,7 +3179,8 @@ static int __mmc_test_register_dbgfs_file(struct mmc_card *card, ...@@ -3179,7 +3179,8 @@ static int __mmc_test_register_dbgfs_file(struct mmc_card *card,
struct mmc_test_dbgfs_file *df; struct mmc_test_dbgfs_file *df;
if (card->debugfs_root) if (card->debugfs_root)
debugfs_create_file(name, mode, card->debugfs_root, card, fops); file = debugfs_create_file(name, mode, card->debugfs_root,
card, fops);
df = kmalloc(sizeof(*df), GFP_KERNEL); df = kmalloc(sizeof(*df), GFP_KERNEL);
if (!df) { if (!df) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment