From: SF Markus Elfring <elfring@users.sourceforge.net>
To: linux-pm@vger.kernel.org, linux-omap@vger.kernel.org,
Eduardo Valentin <edubezval@gmail.com>,
Keerthy <j-keerthy@ti.com>, Zhang Rui <rui.zhang@intel.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org, Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH 2/3] ti-soc-thermal: Delete error messages for failed memory allocations in ti_bandgap_build()
Date: Wed, 26 Apr 2017 17:37:58 +0200 [thread overview]
Message-ID: <65329026-ad0d-df20-1ff6-4befab001b3c@users.sourceforge.net> (raw)
In-Reply-To: <cd524803-b771-c3d2-8906-ee78576c86d4@users.sourceforge.net>
From: Markus Elfring <elfring@users.sourceforge.net>
Date: Wed, 26 Apr 2017 17:03:07 +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/thermal/ti-soc-thermal/ti-bandgap.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index f19cb7612a65..109fb0a5f19f 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -1217,7 +1217,5 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
- if (!bgp) {
- dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
+ if (!bgp)
return ERR_PTR(-ENOMEM);
- }
of_id = of_match_device(of_ti_bandgap_match, &pdev->dev);
if (of_id)
@@ -1229,7 +1227,5 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
- if (!bgp->regval) {
- dev_err(&pdev->dev, "Unable to allocate mem for driver ref\n");
+ if (!bgp->regval)
return ERR_PTR(-ENOMEM);
- }
i = 0;
do {
--
2.12.2
next prev parent reply other threads:[~2017-04-26 15:37 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-26 15:33 [PATCH 0/3] TI-SoC-thermal: Fine-tuning for two functions SF Markus Elfring
2017-04-26 15:34 ` [PATCH 1/3] ti-soc-thermal: Use devm_kcalloc() in ti_bandgap_build() SF Markus Elfring
2017-05-02 3:55 ` Keerthy
2017-04-26 15:37 ` SF Markus Elfring [this message]
2017-05-02 3:52 ` [PATCH 2/3] ti-soc-thermal: Delete error messages for failed memory allocations " Keerthy
2017-04-26 15:39 ` [PATCH 3/3] ti-soc-thermal: Fix a typo in a comment line SF Markus Elfring
2017-05-02 3:51 ` Keerthy
2017-04-27 16:20 ` [PATCH 0/3] TI-SoC-thermal: Fine-tuning for two functions Eduardo Valentin
2017-05-01 5:20 ` Keerthy
2017-05-02 4:55 ` Keerthy
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=65329026-ad0d-df20-1ff6-4befab001b3c@users.sourceforge.net \
--to=elfring@users.sourceforge.net \
--cc=edubezval@gmail.com \
--cc=j-keerthy@ti.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rui.zhang@intel.com \
--cc=wsa@the-dreams.de \
/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).