spi: npcm: Fix an error code in the probe function
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 23 Nov 2018 07:20:24 +0000 (10:20 +0300)
committerMark Brown <broonie@kernel.org>
Fri, 23 Nov 2018 13:25:59 +0000 (13:25 +0000)
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>
drivers/spi/spi-npcm-pspi.c

index 342178e282bcdbd9fa01eb0ff29724316e86177a..fed05b02007cfbf754a58c6c46eadc919c6606a4 100644 (file)
@@ -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 */