From: elfring@users.sourceforge.net (SF Markus Elfring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] soc-knav_dma: Delete error messages for a failed memory allocation in two functions
Date: Mon, 1 May 2017 21:30:20 +0200 [thread overview]
Message-ID: <b37a7b6a-cee6-2536-1ffe-994a208d8d00@users.sourceforge.net> (raw)
In-Reply-To: <eddc35f7-a04b-42f5-ad8b-d345ca0b57b4@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Mon, 1 May 2017 21:14:48 +0200
The script "checkpatch.pl" pointed information out like the following.
WARNING: Possible unnecessary 'out of memory' message
Thus remove such statements here.
Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf
Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
---
drivers/soc/ti/knav_dma.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/soc/ti/knav_dma.c b/drivers/soc/ti/knav_dma.c
index 410018d9054e..dd5adfbf9910 100644
--- a/drivers/soc/ti/knav_dma.c
+++ b/drivers/soc/ti/knav_dma.c
@@ -621,10 +621,9 @@ static int dma_init(struct device_node *cloud, struct device_node *dma_node)
u32 i;
dma = devm_kzalloc(kdev->dev, sizeof(*dma), GFP_KERNEL);
- if (!dma) {
- dev_err(kdev->dev, "could not allocate driver mem\n");
+ if (!dma)
return -ENOMEM;
- }
+
INIT_LIST_HEAD(&dma->list);
INIT_LIST_HEAD(&dma->chan_list);
@@ -740,10 +739,8 @@ static int knav_dma_probe(struct platform_device *pdev)
}
kdev = devm_kzalloc(dev, sizeof(*kdev), GFP_KERNEL);
- if (!kdev) {
- dev_err(dev, "could not allocate driver mem\n");
+ if (!kdev)
return -ENOMEM;
- }
kdev->dev = dev;
INIT_LIST_HEAD(&kdev->list);
--
2.12.2
prev parent reply other threads:[~2017-05-01 19:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-01 19:26 [PATCH 0/3] SoC-TI-knav_dma: Fine-tuning for three function implementations SF Markus Elfring
2017-05-01 19:27 ` [PATCH 1/3] soc-knav_dma: Use seq_putc() in dma_debug_show_channels() SF Markus Elfring
2018-01-19 16:59 ` Santosh Shilimkar
2017-05-01 19:28 ` [PATCH 2/3] soc-knav_dma: Improve a size determination in knav_dma_probe() SF Markus Elfring
2017-05-01 19:30 ` SF Markus Elfring [this message]
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=b37a7b6a-cee6-2536-1ffe-994a208d8d00@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=linux-arm-kernel@lists.infradead.org \
/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 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).