aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/spi
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-11-23 10:20:24 +0300
committerMark Brown <broonie@kernel.org>2018-11-23 13:25:59 +0000
commit428f977a6a6b43154928571b01fa8415c11a9244 (patch)
treed92a0702e036c1299044987e365edf59668f9e90 /drivers/spi
parentf0915dfc44365b487a720d447ad3faa66de5205c (diff)
spi: npcm: Fix an error code in the probe function
There is an IS_ERR() vs PTR_ERR() typo here. The current code returns 1 but we want to return the negative error code. Fixes: 2a22f1b30cee ("spi: npcm: add NPCM PSPI controller driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/spi-npcm-pspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-npcm-pspi.c b/drivers/spi/spi-npcm-pspi.c
index 342178e282bc..fed05b02007c 100644
--- a/drivers/spi/spi-npcm-pspi.c
+++ b/drivers/spi/spi-npcm-pspi.c
@@ -381,7 +381,7 @@ static int npcm_pspi_probe(struct platform_device *pdev)
syscon_regmap_lookup_by_compatible("nuvoton,npcm750-rst");
if (IS_ERR(priv->rst_regmap)) {
dev_err(&pdev->dev, "failed to find nuvoton,npcm750-rst\n");
- return IS_ERR(priv->rst_regmap);
+ return PTR_ERR(priv->rst_regmap);
}
/* reset SPI-HW block */

Privacy Policy