Commit b45a3a42 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by Martin K. Petersen

scsi: qla2xxx: no need to check return value of debugfs_create functions

When calling debugfs functions, there is no need to ever check the return
value.  The function can work or not, but the code logic should never do
something different based on this.

Cc: qla2xxx-upstream@qlogic.com
Cc: "James E.J. Bottomley" <jejb@linux.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 26febfb3
...@@ -446,11 +446,6 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha) ...@@ -446,11 +446,6 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)
atomic_set(&qla2x00_dfs_root_count, 0); atomic_set(&qla2x00_dfs_root_count, 0);
qla2x00_dfs_root = debugfs_create_dir(QLA2XXX_DRIVER_NAME, NULL); qla2x00_dfs_root = debugfs_create_dir(QLA2XXX_DRIVER_NAME, NULL);
if (!qla2x00_dfs_root) {
ql_log(ql_log_warn, vha, 0x00f7,
"Unable to create debugfs root directory.\n");
goto out;
}
create_dir: create_dir:
if (ha->dfs_dir) if (ha->dfs_dir)
...@@ -458,64 +453,28 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha) ...@@ -458,64 +453,28 @@ qla2x00_dfs_setup(scsi_qla_host_t *vha)
mutex_init(&ha->fce_mutex); mutex_init(&ha->fce_mutex);
ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root); ha->dfs_dir = debugfs_create_dir(vha->host_str, qla2x00_dfs_root);
if (!ha->dfs_dir) {
ql_log(ql_log_warn, vha, 0x00f8,
"Unable to create debugfs ha directory.\n");
goto out;
}
atomic_inc(&qla2x00_dfs_root_count); atomic_inc(&qla2x00_dfs_root_count);
create_nodes: create_nodes:
ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count", ha->dfs_fw_resource_cnt = debugfs_create_file("fw_resource_count",
S_IRUSR, ha->dfs_dir, vha, &dfs_fw_resource_cnt_ops); S_IRUSR, ha->dfs_dir, vha, &dfs_fw_resource_cnt_ops);
if (!ha->dfs_fw_resource_cnt) {
ql_log(ql_log_warn, vha, 0x00fd,
"Unable to create debugFS fw_resource_count node.\n");
goto out;
}
ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR, ha->dfs_tgt_counters = debugfs_create_file("tgt_counters", S_IRUSR,
ha->dfs_dir, vha, &dfs_tgt_counters_ops); ha->dfs_dir, vha, &dfs_tgt_counters_ops);
if (!ha->dfs_tgt_counters) {
ql_log(ql_log_warn, vha, 0xd301,
"Unable to create debugFS tgt_counters node.\n");
goto out;
}
ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database", ha->tgt.dfs_tgt_port_database = debugfs_create_file("tgt_port_database",
S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_port_database_ops); S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_port_database_ops);
if (!ha->tgt.dfs_tgt_port_database) {
ql_log(ql_log_warn, vha, 0xd03f,
"Unable to create debugFS tgt_port_database node.\n");
goto out;
}
ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha, ha->dfs_fce = debugfs_create_file("fce", S_IRUSR, ha->dfs_dir, vha,
&dfs_fce_ops); &dfs_fce_ops);
if (!ha->dfs_fce) {
ql_log(ql_log_warn, vha, 0x00f9,
"Unable to create debugfs fce node.\n");
goto out;
}
ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess", ha->tgt.dfs_tgt_sess = debugfs_create_file("tgt_sess",
S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_sess_ops); S_IRUSR, ha->dfs_dir, vha, &dfs_tgt_sess_ops);
if (!ha->tgt.dfs_tgt_sess) {
ql_log(ql_log_warn, vha, 0xd040,
"Unable to create debugFS tgt_sess node.\n");
goto out;
}
if (IS_QLA27XX(ha) || IS_QLA83XX(ha)) { if (IS_QLA27XX(ha) || IS_QLA83XX(ha))
ha->tgt.dfs_naqp = debugfs_create_file("naqp", ha->tgt.dfs_naqp = debugfs_create_file("naqp",
0400, ha->dfs_dir, vha, &dfs_naqp_ops); 0400, ha->dfs_dir, vha, &dfs_naqp_ops);
if (!ha->tgt.dfs_naqp) {
ql_log(ql_log_warn, vha, 0xd011,
"Unable to create debugFS naqp node.\n");
goto out;
}
}
out: out:
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment