[PATCH 5.4 200/222] scsi: hisi_sas: Dont create debugfs dump folder twice

From: Greg Kroah-Hartman
Date: Wed Jan 22 2020 - 08:27:20 EST


From: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>

commit 35160421b63d4753a72e9f72ebcdd9d6f88f84b9 upstream.

Due to a merge error, we attempt to create 2x debugfs dump folders, which
fails:
[ 861.101914] debugfs: Directory 'dump' with parent '0000:74:02.0'
already present!

This breaks the dump function.

To fix, remove the superfluous attempt to create the folder.

Fixes: 7ec7082c57ec ("scsi: hisi_sas: Add hisi_sas_debugfs_alloc() to centralise allocation")
Link: https://lore.kernel.org/r/1571926105-74636-2-git-send-email-john.garry@xxxxxxxxxx
Signed-off-by: Xiang Chen <chenxiang66@xxxxxxxxxxxxx>
Signed-off-by: John Garry <john.garry@xxxxxxxxxx>
Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>

---
drivers/scsi/hisi_sas/hisi_sas_main.c | 3 ---
1 file changed, 3 deletions(-)

--- a/drivers/scsi/hisi_sas/hisi_sas_main.c
+++ b/drivers/scsi/hisi_sas/hisi_sas_main.c
@@ -3719,9 +3719,6 @@ static int hisi_sas_debugfs_alloc(struct
int p, c, d;
size_t sz;

- hisi_hba->debugfs_dump_dentry =
- debugfs_create_dir("dump", hisi_hba->debugfs_dir);
-
sz = hw->debugfs_reg_array[DEBUGFS_GLOBAL]->count * 4;
hisi_hba->debugfs_regs[DEBUGFS_GLOBAL] =
devm_kmalloc(dev, sz, GFP_KERNEL);