[PATCH 1/1] scsi: libcxgbi: remove unnecessary oom message

DORMANTno replies

From: Zhen Lei <hidden>
Date: 2021-06-10 07:50:10
Subsystem: scsi subsystem, the rest · Maintainers: "James E.J. Bottomley", "Martin K. Petersen", Linus Torvalds

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

Remove it can help us save a bit of memory.

Signed-off-by: Zhen Lei <redacted>
---
 drivers/scsi/cxgbi/libcxgbi.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/cxgbi/libcxgbi.c b/drivers/scsi/cxgbi/libcxgbi.c
index 8c7d4dda4cf2994..df370fb5dd86f96 100644
--- a/drivers/scsi/cxgbi/libcxgbi.c
+++ b/drivers/scsi/cxgbi/libcxgbi.c
@@ -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);
-- 
2.26.0.106.g9fadedd

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help