From: Dan Carpenter <dan.carpenter@oracle.com>
To: Zhang Rui <rui.zhang@intel.com>, Stefan Wahren <stefan.wahren@i2se.com>
Cc: "Eduardo Valentin" <edubezval@gmail.com>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Ray Jui" <rjui@broadcom.com>,
"Scott Branden" <sbranden@broadcom.com>,
bcm-kernel-feedback-list@broadcom.com,
"Eric Anholt" <eric@anholt.net>,
"Rafał Miłecki" <rafal@milecki.pl>,
"Martin Sperl" <kernel@martin.sperl.org>,
linux-pm@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] thermal: bcm2835: fix an error code in probe()
Date: Wed, 14 Jun 2017 09:13:27 +0000 [thread overview]
Message-ID: <20170614091327.GD29394@elgon.mountain> (raw)
This causes a static checker because we're passing a valid pointer to
PTR_ERR(). "err" is already the correct error code, so we can just
delete this line.
Fixes: bcb7dd9ef206 ("thermal: bcm2835: add thermal driver for bcm2835 SoC")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/thermal/broadcom/bcm2835_thermal.c b/drivers/thermal/broadcom/bcm2835_thermal.c
index 0ecf80890c84..e6863c841662 100644
--- a/drivers/thermal/broadcom/bcm2835_thermal.c
+++ b/drivers/thermal/broadcom/bcm2835_thermal.c
@@ -245,7 +245,6 @@ static int bcm2835_thermal_probe(struct platform_device *pdev)
*/
err = tz->ops->get_trip_temp(tz, 0, &trip_temp);
if (err < 0) {
- err = PTR_ERR(tz);
dev_err(&pdev->dev,
"Not able to read trip_temp: %d\n",
err);
next reply other threads:[~2017-06-14 9:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 9:13 Dan Carpenter [this message]
2017-06-14 17:12 ` [PATCH] thermal: bcm2835: fix an error code in probe() Stefan Wahren
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=20170614091327.GD29394@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=edubezval@gmail.com \
--cc=eric@anholt.net \
--cc=f.fainelli@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=kernel@martin.sperl.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafal@milecki.pl \
--cc=rjui@broadcom.com \
--cc=rui.zhang@intel.com \
--cc=sbranden@broadcom.com \
--cc=stefan.wahren@i2se.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox