Although if the debugfs initialization fails, we will delete the debugfs
folder of hisi_sas, but we did not consider the scenario where debugfs was
successfully initialized, but the probe failed for other reasons. We found
out that hisi_sas folder is still remain after the probe failed.
When probe fail, we should delete debugfs folder to avoid the above issue.
Link: https://lore.kernel.org/r/1571926105-74636-18-git-send-email-john.garry@huawei.com
Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
Signed-off-by: John Garry <john.garry@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
 err_out_register_ha:
        scsi_remove_host(shost);
 err_out_ha:
+       hisi_sas_debugfs_exit(hisi_hba);
        hisi_sas_free(hisi_hba);
        scsi_host_put(shost);
        return rc;
 
 err_out_register_ha:
        scsi_remove_host(shost);
 err_out_ha:
+       hisi_sas_debugfs_exit(hisi_hba);
        scsi_host_put(shost);
 err_out_regions:
        pci_release_regions(pdev);