diff mbox series

bus: ixp4xx: return on error in ixp4xx_exp_probe()

Message ID 20210807230016.3607666-1-linus.walleij@linaro.org (mailing list archive)
State Queued
Headers show
Series bus: ixp4xx: return on error in ixp4xx_exp_probe() | expand

Commit Message

Linus Walleij Aug. 7, 2021, 11 p.m. UTC
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(-)

Comments

Arnd Bergmann Aug. 12, 2021, 8:44 p.m. UTC | #1
From: Arnd Bergmann <arnd@arndb.de>

On Sun, 8 Aug 2021 01:00:16 +0200, Linus Walleij wrote:
> This code was intended to return an error code if regmap_read() fails
> but the return statement was missing.

Applied to arm/drivers, thanks!

[1/1] bus: ixp4xx: return on error in ixp4xx_exp_probe()
      commit: d2c334f49c8305ff8ce31ea33183977a2935ba55

       Arnd
diff mbox series

Patch

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