Skip to contentSkip to conversation

scsi: qla2xxx: Remove error checking for debugfs_create_dir()

PATCH Superseded Wang Ming 1 participant 1 message Jul 13, 2023

Subsystems (2)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Wang Ming

author
#0 lore raw

PATCH 1/1 scsi: qla2xxx: Remove error checking for debugfs_create_dir()

It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in qla2x00_dfs_create_rport() and qla2x00_dfs_setup().

---
 drivers/scsi/qla2xxx/qla_dfs.c | 12 ------------
 1 file changed, 12 deletions(-)
drivers/scsi/qla2xxx/qla_dfs.c +0 -12
index 1925cc6897b6..8cd67092aff4 100644
@@ -111,13 +111,8 @@ qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp)
 	debugfs_create_file(#_attr, 0400, fp->dfs_rport_dir,	\
 		fp, &qla_dfs_rport_field_##_attr##_fops)
 
-	if (!vha->dfs_rport_root || fp->dfs_rport_dir)
-		return;
-
 	sprintf(wwn, "pn-%016llx", wwn_to_u64(fp->port_name));
 	fp->dfs_rport_dir = debugfs_create_dir(wwn, vha->dfs_rport_root);
-	if (!fp->dfs_rport_dir)
-		return;
 	if (NVME_TARGET(vha->hw, fp))
 		debugfs_create_file("dev_loss_tmo", 0600, fp->dfs_rport_dir,
 				    fp, &qla_dfs_rport_dev_loss_tmo_fops);
@@ -139,8 +134,6 @@ qla2x00_dfs_create_rport(scsi_qla_host_t *vha, struct fc_port *fp)
 void
 qla2x00_dfs_remove_rport(scsi_qla_host_t *vha, struct fc_port *fp)
 {
-	if (!vha->dfs_rport_root || !fp->dfs_rport_dir)
-		return;
 	debugfs_remove_recursive(fp->dfs_rport_dir);
 	fp->dfs_rport_dir = NULL;
 }
@@ -705,11 +698,6 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)
 		}
 	}
 	vha->dfs_rport_root = debugfs_create_dir("rports", ha->dfs_dir);
-	if (!vha->dfs_rport_root) {
-		ql_log(ql_log_warn, vha, 0xd012,
-		       "Unable to create debugFS rports node.\n");
-		goto out;
-	}
 out:
 	return 0;
 }
Signature · 1 line
2.25.1