linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] scsi: aacraid: remove unnecessary oom message
@ 2021-06-10  7:44 Zhen Lei
  0 siblings, 0 replies; only message in thread
From: Zhen Lei @ 2021-06-10  7:44 UTC (permalink / raw)
  To: Adaptec OEM Raid Solutions, 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/aacraid/comminit.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 355b16f0b1456bd..282519ccd4a22da 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -85,10 +85,8 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co
 			printfbufsiz + host_rrq_size;
 
 	base = dma_alloc_coherent(&dev->pdev->dev, size, &phys, GFP_KERNEL);
-	if (base == NULL) {
-		printk(KERN_ERR "aacraid: unable to create mapping.\n");
+	if (!base)
 		return 0;
-	}
 
 	dev->comm_addr = (void *)base;
 	dev->comm_phys = phys;
@@ -635,10 +633,8 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
 	 */
 
 	dev->queues = kzalloc(sizeof(struct aac_queue_block), GFP_KERNEL);
-	if (dev->queues == NULL) {
-		printk(KERN_ERR "Error could not allocate comm region.\n");
+	if (!dev->queues)
 		return NULL;
-	}
 
 	if (aac_comm_init(dev)<0){
 		kfree(dev->queues);
-- 
2.26.0.106.g9fadedd



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

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

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).