From: Zhen Lei <thunder.leizhen@huawei.com>
To: "James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
linux-scsi <linux-scsi@vger.kernel.org>
Cc: Zhen Lei <thunder.leizhen@huawei.com>
Subject: [PATCH 1/1] scsi: aic94xx: remove unnecessary oom message
Date: Thu, 10 Jun 2021 15:46:01 +0800 [thread overview]
Message-ID: <20210610074601.15659-1-thunder.leizhen@huawei.com> (raw)
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/aic94xx/aic94xx_init.c | 4 +---
drivers/scsi/aic94xx/aic94xx_sds.c | 4 +---
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c
index a195bfe9eccc073..9edd6008bbdec03 100644
--- a/drivers/scsi/aic94xx/aic94xx_init.c
+++ b/drivers/scsi/aic94xx/aic94xx_init.c
@@ -725,10 +725,8 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
asd_dev = &asd_pcidev_data[asd_id];
asd_ha = kzalloc(sizeof(*asd_ha), GFP_KERNEL);
- if (!asd_ha) {
- asd_printk("out of memory\n");
+ if (!asd_ha)
goto Err_put;
- }
asd_ha->pcidev = dev;
asd_ha->sas_ha.dev = &asd_ha->pcidev->dev;
asd_ha->sas_ha.lldd_ha = asd_ha;
diff --git a/drivers/scsi/aic94xx/aic94xx_sds.c b/drivers/scsi/aic94xx/aic94xx_sds.c
index 297a66770260ccf..1b46f0018e0bfe5 100644
--- a/drivers/scsi/aic94xx/aic94xx_sds.c
+++ b/drivers/scsi/aic94xx/aic94xx_sds.c
@@ -342,10 +342,8 @@ int asd_read_ocm(struct asd_ha_struct *asd_ha)
return -1;
dir = kmalloc(sizeof(*dir), GFP_KERNEL);
- if (!dir) {
- asd_printk("no memory for ocm dir\n");
+ if (!dir)
return -ENOMEM;
- }
err = asd_read_ocm_dir(asd_ha, dir, 0);
if (err)
--
2.26.0.106.g9fadedd
reply other threads:[~2021-06-10 7:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210610074601.15659-1-thunder.leizhen@huawei.com \
--to=thunder.leizhen@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.