bus: ixp4xx: return on error in ixp4xx_exp_probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Sat, 7 Aug 2021 23:00:16 +0000 (01:00 +0200)
committerArnd Bergmann <arnd@arndb.de>
Thu, 12 Aug 2021 20:34:13 +0000 (22:34 +0200)
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>
Link: https://lore.kernel.org/r/20210807230016.3607666-1-linus.walleij@linaro.org'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/bus/intel-ixp4xx-eb.c

index 9acd00d..a438844 100644 (file)
@@ -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