Blame SOURCES/0003-scsi-scsi-qla2xxx-no-need-to-check-return-value-of-d.patch

3c6e85
From 11694254382d164d707f40068498c35cb33c85ba Mon Sep 17 00:00:00 2001
3c6e85
From: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Date: Thu, 1 Aug 2019 15:54:23 -0400
3c6e85
Subject: [PATCH 003/124] [scsi] scsi: qla2xxx: no need to check return value
3c6e85
 of debugfs_create functions
3c6e85
3c6e85
Message-id: <20190801155618.12650-4-hmadhani@redhat.com>
3c6e85
Patchwork-id: 267780
3c6e85
O-Subject: [RHEL 7.8 e-stor PATCH 003/118] scsi: qla2xxx: no need to check return value of debugfs_create functions
3c6e85
Bugzilla: 1729270
3c6e85
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
3c6e85
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
3c6e85
3c6e85
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3c6e85
3c6e85
Bugzilla 1729270
3c6e85
3c6e85
When calling debugfs functions, there is no need to ever check the return
3c6e85
value.  The function can work or not, but the code logic should never do
3c6e85
something different based on this.
3c6e85
3c6e85
Cc: qla2xxx-upstream@qlogic.com
3c6e85
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
3c6e85
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
3c6e85
Cc: linux-scsi@vger.kernel.org
3c6e85
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3c6e85
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3c6e85
(cherry picked from commit b45a3a428f559082418b182d35fc20a49b647c75)
3c6e85
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Signed-off-by: Jan Stancek <jstancek@redhat.com>
3c6e85
---
3c6e85
 drivers/scsi/qla2xxx/qla_dfs.c | 35 -----------------------------------
3c6e85
 1 file changed, 35 deletions(-)
3c6e85
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_dfs.c b/drivers/scsi/qla2xxx/qla_dfs.c
3c6e85
index efb3a3c271ab..8688372955a0 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_dfs.c
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_dfs.c
3c6e85
@@ -371,11 +371,6 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)
3c6e85
 
3c6e85
 	atomic_set(&qla2x00_dfs_root_count, 0);
3c6e85
 	qla2x00_dfs_root = debugfs_create_dir(QLA2XXX_DRIVER_NAME, NULL);
3c6e85
-	if (!qla2x00_dfs_root) {
3c6e85
-		ql_log(ql_log_warn, vha, 0x00f7,
3c6e85
-		    "Unable to create debugfs root directory.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 create_dir:
3c6e85
 	if (ha->dfs_dir)
3c6e85
@@ -383,54 +378,24 @@ create_dir:
3c6e85
 
3c6e85
 	mutex_init(&ha->fce_mutex);
3c6e85
 	ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root);
3c6e85
-	if (!ha->dfs_dir) {
3c6e85
-		ql_log(ql_log_warn, vha, 0x00f8,
3c6e85
-		    "Unable to create debugfs ha directory.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 	atomic_inc(&qla2x00_dfs_root_count);
3c6e85
 
3c6e85
 create_nodes:
3c6e85
 	ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count",
3c6e85
 	    S_IRUSR, ha->dfs_dir, vha, &dfs_fw_resource_cnt_ops);
3c6e85
-	if (!ha->dfs_fw_resource_cnt) {
3c6e85
-		ql_log(ql_log_warn, vha, 0x00fd,
3c6e85
-		    "Unable to create debugFS fw_resource_count node.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 	ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR,
3c6e85
 	    ha->dfs_dir, vha, &dfs_tgt_counters_ops);
3c6e85
-	if (!ha->dfs_tgt_counters) {
3c6e85
-		ql_log(ql_log_warn, vha, 0xd301,
3c6e85
-		    "Unable to create debugFS tgt_counters node.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 	ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database",
3c6e85
 	    S_IRUSR,  ha->dfs_dir, vha, &dfs_tgt_port_database_ops);
3c6e85
-	if (!ha->tgt.dfs_tgt_port_database) {
3c6e85
-		ql_log(ql_log_warn, vha, 0xd03f,
3c6e85
-		    "Unable to create debugFS tgt_port_database node.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 	ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha,
3c6e85
 	    &dfs_fce_ops);
3c6e85
-	if (!ha->dfs_fce) {
3c6e85
-		ql_log(ql_log_warn, vha, 0x00f9,
3c6e85
-		    "Unable to create debugfs fce node.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 	ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess",
3c6e85
 		S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_sess_ops);
3c6e85
-	if (!ha->tgt.dfs_tgt_sess) {
3c6e85
-		ql_log(ql_log_warn, vha, 0xd040,
3c6e85
-		    "Unable to create debugFS tgt_sess node.\n");
3c6e85
-		goto out;
3c6e85
-	}
3c6e85
 
3c6e85
 out:
3c6e85
 	return 0;
3c6e85
-- 
3c6e85
2.13.6
3c6e85