Commit 3363531b authored by Yihang Li's avatar Yihang Li Committed by JiangShui
Browse files

scsi: hisi_sas: Remove redundant checks for automatic debugfs dump

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8IL6H


CVE: NA

----------------------------------------------------------------------

In commit 63f0733d07ce ("scsi: hisi_sas: Allocate DFX memory during dump
trigger"), the memory allocation time of the DFX is changed from device
initialization to dump occurs, so .debugfs_itct is not a valid address and
do not need to check.

The parameter hisi_sas_debugfs_enable is enough to check whether automatic
debugfs dump is triggered, so remove redunant checks.

Fixes: 63f0733d07ce ("scsi: hisi_sas: Allocate DFX memory during dump trigger")
Signed-off-by: default avatarYihang Li <liyihang9@huawei.com>
Signed-off-by: default avatarxiabing <xiabing12@h-partners.com>
parent 60778e5b
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1672,7 +1672,7 @@ static int hisi_sas_controller_prereset(struct hisi_hba *hisi_hba)
		return -1;
	}

	if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct)
	if (hisi_sas_debugfs_enable)
		hisi_hba->hw->debugfs_snapshot_regs(hisi_hba);

	return 0;
@@ -2210,7 +2210,7 @@ _hisi_sas_internal_task_abort(struct hisi_hba *hisi_hba,

	/* Internal abort timed out */
	if ((task->task_state_flags & SAS_TASK_STATE_ABORTED)) {
		if (hisi_sas_debugfs_enable && hisi_hba->debugfs_itct[0].itct) {
		if (hisi_sas_debugfs_enable) {
			down(&hisi_hba->sem);
			hisi_hba->hw->debugfs_snapshot_regs(hisi_hba);
			up(&hisi_hba->sem);