Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Niklas Cassel <niklas.cassel@linaro.org>
To: broonie@kernel.org, Liam Girdwood <lgirdwood@gmail.com>
Cc: linux-arm-msm@vger.kernel.org, johan@kernel.org,
	Niklas Cassel <niklas.cassel@linaro.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/4] regulator: qcom_spmi: Use correct regmap when checking for error
Date: Mon, 16 Jul 2018 15:32:52 +0200	[thread overview]
Message-ID: <20180716133255.1506-3-niklas.cassel@linaro.org> (raw)
In-Reply-To: <20180716133255.1506-1-niklas.cassel@linaro.org>

Since we have just assigned saw_regmap, and since the error message
refers to saw_regmap, it feels safe to assume that it is saw_regmap,
and not regmap, that should be checked for errors.

Fixes: 0caecaa87202 ("regulator: qcom_spmi: Add support for SAW")
Signed-off-by: Niklas Cassel <niklas.cassel@linaro.org>
---
 drivers/regulator/qcom_spmi-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 4cc14c65d86b..ba3d5e63ada6 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -1775,7 +1775,7 @@ static int qcom_spmi_regulator_probe(struct platform_device *pdev)
 		syscon = of_parse_phandle(node, "qcom,saw-reg", 0);
 		saw_regmap = syscon_node_to_regmap(syscon);
 		of_node_put(syscon);
-		if (IS_ERR(regmap))
+		if (IS_ERR(saw_regmap))
 			dev_err(dev, "ERROR reading SAW regmap\n");
 	}
 
-- 
2.17.1

  parent reply	other threads:[~2018-07-16 13:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-16 13:32 [PATCH v2 0/4] regulator: qcom_spmi: fix Bad of_node_put() splat Niklas Cassel
2018-07-16 13:32 ` [PATCH v2 1/4] regulator: qcom_spmi: Fix warning Bad of_node_put() Niklas Cassel
2018-07-20 16:45   ` Applied "regulator: qcom_spmi: Fix warning Bad of_node_put()" to the regulator tree Mark Brown
2018-07-16 13:32 ` Niklas Cassel [this message]
2018-07-16 13:32 ` [PATCH v2 3/4] regulator: qcom_spmi: Do not initialise static to NULL Niklas Cassel
2018-07-16 13:32 ` [PATCH v2 4/4] regulator: qcom_spmi: Indent with tabs instead of spaces Niklas Cassel

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=20180716133255.1506-3-niklas.cassel@linaro.org \
    --to=niklas.cassel@linaro.org \
    --cc=broonie@kernel.org \
    --cc=johan@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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