Commit a835d3a1 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Linus Walleij

pinctrl: mcp23s08: Print error message when regmap init fails

It is useful for debugging to have the error message printed
when regmap initialisation fails. Add it to the driver.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Martin Hundebøll <martin@geanix.com>
Link: https://lore.kernel.org/r/20201009180856.4738-2-andriy.shevchenko@linux.intel.comTested-by: default avatarJan Kundrát <jan.kundrat@cesnet.cz>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 2b12c136
......@@ -126,6 +126,8 @@ static int mcp23s08_spi_regmap_init(struct mcp23s08 *mcp, struct device *dev,
copy->name = name;
mcp->regmap = devm_regmap_init(dev, &mcp23sxx_spi_regmap, mcp, copy);
if (IS_ERR(mcp->regmap))
dev_err(dev, "regmap init failed for %s\n", mcp->chip.label);
return PTR_ERR_OR_ZERO(mcp->regmap);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment