Commit 428f977a authored by Dan Carpenter's avatar Dan Carpenter Committed by Mark Brown

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: 2a22f1b3 ("spi: npcm: add NPCM PSPI controller driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent f0915dfc
......@@ -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 */
......
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