Skip to contentSkip to conversation

bus: ixp4xx: return on error in ixp4xx_exp_probe()

PATCH In review Dan Carpenter 2 participants 2 messages Aug 6, 2021 – Aug 7, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bus: ixp4xx: return on error in ixp4xx_exp_probe()

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")
---
 drivers/bus/intel-ixp4xx-eb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/bus/intel-ixp4xx-eb.c +1 -1
index 9acd00da413c..a4388440aca7 100644
@@ -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
Signature · 1 line
2.20.1
#1 lore raw
Quoted 5 lines · Dan Carpenter

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")

Ooops that's a bug.

Patch applied, I will relay this to the ARM SoC tree.

Yours,
Linus Walleij