From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: Niklas Cassel , Mark Brown , Sasha Levin Subject: [PATCH AUTOSEL 4.18 80/88] regulator: qcom_spmi: Use correct regmap when checking for error Date: Fri, 7 Sep 2018 00:36:48 +0000 Message-ID: <20180907003547.57567-80-alexander.levin@microsoft.com> References: <20180907003547.57567-1-alexander.levin@microsoft.com> In-Reply-To: <20180907003547.57567-1-alexander.levin@microsoft.com> Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: From: Niklas Cassel [ Upstream commit 85046a15529606466bc778e1205f4cab8e3724d1 ] 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 Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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/qc= om_spmi-regulator.c index 9817f1a75342..8d5cd624b4b8 100644 --- a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -1774,7 +1774,7 @@ static int qcom_spmi_regulator_probe(struct platform_= device *pdev) syscon =3D of_parse_phandle(node, "qcom,saw-reg", 0); saw_regmap =3D 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"); } =20 --=20 2.17.1