mtd: spi-nor: intel: use ERR_CAST in return statement
authorNicholas Mc Guire <der.herr@hofr.at>
Mon, 13 Feb 2017 08:14:21 +0000 (09:14 +0100)
committerCyrille Pitchen <cyrille.pitchen@atmel.com>
Tue, 7 Mar 2017 21:09:56 +0000 (22:09 +0100)
This fixes a sparse warning about incorrect type in return expression.

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
drivers/mtd/spi-nor/intel-spi.c

index e43ce63881a6fb161eb928b301a03429637b70ce..986a3d020a3a154157f025f912fd88fd1c5881de 100644 (file)
@@ -728,7 +728,7 @@ struct intel_spi *intel_spi_probe(struct device *dev,
 
        ispi->base = devm_ioremap_resource(dev, mem);
        if (IS_ERR(ispi->base))
-               return ispi->base;
+               return ERR_CAST(ispi->base);
 
        ispi->dev = dev;
        ispi->info = info;