Skip to contentSkip to conversation

scsi: tcm_qla2xxx: remove unnecessary oom message

PATCH New Zhen Lei 1 participant 1 message Jun 10, 2021

Subsystems (2)
lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 scsi: tcm_qla2xxx: remove unnecessary oom message

Fixes scripts/checkpatch.pl warning:
WARNING: Possible unnecessary 'out of memory' message

Remove it can help us save a bit of memory.

---
 drivers/scsi/qla2xxx/tcm_qla2xxx.c | 16 ++++------------
 1 file changed, 4 insertions(+), 12 deletions(-)
drivers/scsi/qla2xxx/tcm_qla2xxx.c +4 -12
index 03de1bcf1461d77..d537a7bc27f08b0 100644
@@ -1035,10 +1035,8 @@ static struct se_portal_group *tcm_qla2xxx_make_tpg(struct se_wwn *wwn,
 	}
 
 	tpg = kzalloc(sizeof(struct tcm_qla2xxx_tpg), GFP_KERNEL);
-	if (!tpg) {
-		pr_err("Unable to allocate struct tcm_qla2xxx_tpg\n");
+	if (!tpg)
 		return ERR_PTR(-ENOMEM);
-	}
 	tpg->lport = lport;
 	tpg->lport_tpgt = tpgt;
 	/*
@@ -1151,10 +1149,8 @@ static struct se_portal_group *tcm_qla2xxx_npiv_make_tpg(struct se_wwn *wwn,
 		return ERR_PTR(-EINVAL);
 
 	tpg = kzalloc(sizeof(struct tcm_qla2xxx_tpg), GFP_KERNEL);
-	if (!tpg) {
-		pr_err("Unable to allocate struct tcm_qla2xxx_tpg\n");
+	if (!tpg)
 		return ERR_PTR(-ENOMEM);
-	}
 	tpg->lport = lport;
 	tpg->lport_tpgt = tpgt;
 
@@ -1653,10 +1649,8 @@ static struct se_wwn *tcm_qla2xxx_make_lport(
 		return ERR_PTR(-EINVAL);
 
 	lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL);
-	if (!lport) {
-		pr_err("Unable to allocate struct tcm_qla2xxx_lport\n");
+	if (!lport)
 		return ERR_PTR(-ENOMEM);
-	}
 	lport->lport_wwpn = wwpn;
 	tcm_qla2xxx_format_wwn(&lport->lport_name[0], TCM_QLA2XXX_NAMELEN,
 				wwpn);
@@ -1779,10 +1773,8 @@ static struct se_wwn *tcm_qla2xxx_npiv_make_lport(
 		return ERR_PTR(-EINVAL);
 
 	lport = kzalloc(sizeof(struct tcm_qla2xxx_lport), GFP_KERNEL);
-	if (!lport) {
-		pr_err("Unable to allocate struct tcm_qla2xxx_lport for NPIV\n");
+	if (!lport)
 		return ERR_PTR(-ENOMEM);
-	}
 	lport->lport_npiv_wwpn = npiv_wwpn;
 	lport->lport_npiv_wwnn = npiv_wwnn;
 	sprintf(lport->lport_naa_name, "naa.%016llx", (unsigned long long) npiv_wwpn);
Signature · 1 line
2.26.0.106.g9fadedd