All of lore.kernel.org
 help / color / mirror / Atom feed
From: "thermal-bot for Fabio Estevam" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Fabio Estevam <festevam@gmail.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal: imx8mm: Print the correct error code
Date: Mon, 07 Dec 2020 13:47:12 -0000	[thread overview]
Message-ID: <160734883254.3364.9824171514292521688.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20201202232448.2692-1-festevam@gmail.com>

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     ce662ccde5c6ae4f4d89fe71570bf59441004eb9
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//ce662ccde5c6ae4f4d89fe71570bf59441004eb9
Author:        Fabio Estevam <festevam@gmail.com>
AuthorDate:    Wed, 02 Dec 2020 20:24:47 -03:00
Committer:     Daniel Lezcano <daniel.lezcano@linaro.org>
CommitterDate: Fri, 04 Dec 2020 20:46:03 +01:00

thermal: imx8mm: Print the correct error code

Currently the error message does not print the correct error code.

Fix it by initializing 'ret' to the proper error code.

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20201202232448.2692-1-festevam@gmail.com
---
 drivers/thermal/imx8mm_thermal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index a1e4f9b..ce7cb64 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -166,10 +166,11 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 							     &tmu->sensors[i],
 							     &tmu_tz_ops);
 		if (IS_ERR(tmu->sensors[i].tzd)) {
+			ret = PTR_ERR(tmu->sensors[i].tzd);
 			dev_err(&pdev->dev,
 				"failed to register thermal zone sensor[%d]: %d\n",
 				i, ret);
-			return PTR_ERR(tmu->sensors[i].tzd);
+			return ret;
 		}
 		tmu->sensors[i].hw_id = i;
 	}

      parent reply	other threads:[~2020-12-07 13:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-02 23:24 [PATCH 1/2] thermal: imx8mm: Print the correct error code Fabio Estevam
2020-12-02 23:24 ` [PATCH 2/2] thermal: imx8mm: Disable the clock on probe failure Fabio Estevam
2020-12-07 13:47   ` [thermal: thermal/next] " thermal-bot for Fabio Estevam
2020-12-07 13:47 ` thermal-bot for Fabio Estevam [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=160734883254.3364.9824171514292521688.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=festevam@gmail.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@intel.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.