Message ID | 20181123072024.5vtjzta4rcmqtyph@kili.mountain (mailing list archive) |
---|---|
State | Accepted |
Commit | 428f977a6a6b43154928571b01fa8415c11a9244 |
Headers | show |
Series | spi: npcm: Fix an error code in the probe function | expand |
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 */
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> --- drivers/spi/spi-npcm-pspi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)