lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230713072640.1587-1-machel@vivo.com>
Date:   Thu, 13 Jul 2023 15:26:25 +0800
From:   Wang Ming <machel@...o.com>
To:     Nilesh Javali <njavali@...vell.com>,
        GR-QLogic-Storage-Upstream@...vell.com,
        "James E.J. Bottomley" <jejb@...ux.ibm.com>,
        "Martin K. Petersen" <martin.petersen@...cle.com>,
        linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     opensource.kernel@...o.com, gregkh@...uxfoundation.org,
        error27@...il.com, Wang Ming <machel@...o.com>
Subject: [PATCH v1] 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().

Signed-off-by: Wang Ming <machel@...o.com>
---
 drivers/scsi/qla2xxx/qla_dfs.c | 12 ------------
 1 file changed, 12 deletions(-)

diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
index 1925cc6897b6..8cd67092aff4 100644
--- a/drivers/scsi/qla2xxx/qla_dfs.c
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
@@ -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;
 }
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ