All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: pmcraid: remove unnecessary oom message
@ 2021-06-10  8:03 Zhen Lei
  0 siblings, 0 replies; only message in thread
From: Zhen Lei @ 2021-06-10  8:03 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen, linux-scsi; +Cc: Zhen Lei

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 <thunder.leizhen@huawei.com>
---
 drivers/scsi/pmcraid.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index bffd9a9349e7245..4754e72babc82cf 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -3601,11 +3601,8 @@ static long pmcraid_ioctl_passthrough(
 
 	buffer_size = sizeof(struct pmcraid_passthrough_ioctl_buffer);
 	buffer = kmalloc(buffer_size, GFP_KERNEL);
-
-	if (!buffer) {
-		pmcraid_err("no memory for passthrough buffer\n");
+	if (!buffer)
 		return -ENOMEM;
-	}
 
 	request_offset =
 	    offsetof(struct pmcraid_passthrough_ioctl_buffer, request_buffer);
@@ -3903,11 +3900,8 @@ static long pmcraid_chr_ioctl(
 	int retval = -ENOTTY;
 
 	hdr = kmalloc(sizeof(struct pmcraid_ioctl_header), GFP_KERNEL);
-
-	if (!hdr) {
-		pmcraid_err("failed to allocate memory for ioctl header\n");
+	if (!hdr)
 		return -ENOMEM;
-	}
 
 	retval = pmcraid_check_ioctl_buffer(cmd, argp, hdr);
 
-- 
2.26.0.106.g9fadedd



^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-10  8:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  8:03 [PATCH 1/1] scsi: pmcraid: remove unnecessary oom message Zhen Lei

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.