summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinctrl-mcp23s08_spi.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-10-09 20:08:56 +0200
committerLinus Walleij <linus.walleij@linaro.org>2020-11-05 11:30:31 +0100
commita835d3a114ab0dc2f0d8c6963c3f53734b1c5965 (patch)
tree6cc3da6d47697f01561ddc87164541df73682189 /drivers/pinctrl/pinctrl-mcp23s08_spi.c
parentpinctrl: mcp23s08: Use full chunk of memory for regmap configuration (diff)
downloadlinux-a835d3a114ab0dc2f0d8c6963c3f53734b1c5965.tar.xz
linux-a835d3a114ab0dc2f0d8c6963c3f53734b1c5965.zip
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: Andy 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.com Tested-by: Jan Kundrát <jan.kundrat@cesnet.cz> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-mcp23s08_spi.c')
-rw-r--r--drivers/pinctrl/pinctrl-mcp23s08_spi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pinctrl/pinctrl-mcp23s08_spi.c b/drivers/pinctrl/pinctrl-mcp23s08_spi.c
index 7c72cffe1412..9ae10318f6f3 100644
--- a/drivers/pinctrl/pinctrl-mcp23s08_spi.c
+++ b/drivers/pinctrl/pinctrl-mcp23s08_spi.c
@@ -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);
}