soc.lore.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: arm@kernel.org, soc@kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Dan Carpenter <dan.carpenter@oracle.com>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: [PATCH] bus: ixp4xx: return on error in ixp4xx_exp_probe()
Date: Sun,  8 Aug 2021 01:00:16 +0200	[thread overview]
Message-ID: <20210807230016.3607666-1-linus.walleij@linaro.org> (raw)
Message-ID: <20210807230016.MDo3HooltUgSHng8u3kL22LIoB10HkBPRj_daUvWBk4@z> (raw)

From: Dan Carpenter <dan.carpenter@oracle.com>

This code was intended to return an error code if regmap_read() fails
but the return statement was missing.

Fixes: 1c953bda90ca ("bus: ixp4xx: Add a driver for IXP4xx expansion bus")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
SoC maintainers: please apply this to the same branch where the
bus changes in the pull request "ixp4xx-drivers-arm-soc-v5.15-1"
was pulled in.
---
 drivers/bus/intel-ixp4xx-eb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/bus/intel-ixp4xx-eb.c b/drivers/bus/intel-ixp4xx-eb.c
index 9acd00da413c..a4388440aca7 100644
--- a/drivers/bus/intel-ixp4xx-eb.c
+++ b/drivers/bus/intel-ixp4xx-eb.c
@@ -369,7 +369,7 @@ static int ixp4xx_exp_probe(struct platform_device *pdev)
 	/* We check that the regmap work only on first read */
 	ret = regmap_read(eb->rmap, IXP4XX_EXP_CNFG0, &val);
 	if (ret)
-		dev_err_probe(dev, ret, "cannot read regmap\n");
+		return dev_err_probe(dev, ret, "cannot read regmap\n");
 	if (val & IXP4XX_EXP_CNFG0_MEM_MAP)
 		eb->bus_base = IXP4XX_EXP_BOOT_BASE;
 	else
-- 
2.31.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2021-08-07 23:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-07 23:00 Linus Walleij [this message]
2021-08-07 23:00 ` [PATCH] bus: ixp4xx: return on error in ixp4xx_exp_probe() Linus Walleij
2021-08-12 20:44 ` Arnd Bergmann
2021-08-12 20:44   ` Arnd Bergmann

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=20210807230016.3607666-1-linus.walleij@linaro.org \
    --to=linus.walleij@linaro.org \
    --cc=arm@kernel.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=soc@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;
as well as URLs for NNTP newsgroup(s).