Skip to contentSkip to conversation

scsi: libcxgbi: remove unnecessary oom message

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

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 scsi: libcxgbi: 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/cxgbi/libcxgbi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/scsi/cxgbi/libcxgbi.c +3 -4
index 8c7d4dda4cf2994..df370fb5dd86f96 100644
@@ -556,12 +556,11 @@ EXPORT_SYMBOL_GPL(cxgbi_sock_free_cpl_skbs);
 
 static struct cxgbi_sock *cxgbi_sock_create(struct cxgbi_device *cdev)
 {
-	struct cxgbi_sock *csk = kzalloc(sizeof(*csk), GFP_NOIO);
+	struct cxgbi_sock *csk;
 
-	if (!csk) {
-		pr_info("alloc csk %zu failed.\n", sizeof(*csk));
+	csk = kzalloc(sizeof(*csk), GFP_NOIO);
+	if (!csk)
 		return NULL;
-	}
 
 	if (cdev->csk_alloc_cpls(csk) < 0) {
 		pr_info("csk 0x%p, alloc cpls failed.\n", csk);
Signature · 1 line
2.26.0.106.g9fadedd