[v2,18/20] scsi: aacraid: remove unnecessary oom message

Message ID 20210616063714.778-19-thunder.leizhen@huawei.com
State New
Headers show
Series
  • scsi: remove unnecessary oom message
Related show

Commit Message

Zhen Lei June 16, 2021, 6:37 a.m.
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(-)

-- 
2.26.0.106.g9fadedd

Patch

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);