From: Nicholas Mc Guire Date: Mon, 13 Feb 2017 08:14:21 +0000 (+0100) Subject: mtd: spi-nor: intel: use ERR_CAST in return statement X-Git-Tag: v4.12-rc1~24^2~5^2~9 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=011de1b1db534b0ab4ad8099b99c12a17e7c68e0;p=karo-tx-linux.git mtd: spi-nor: intel: use ERR_CAST in return statement This fixes a sparse warning about incorrect type in return expression. Signed-off-by: Nicholas Mc Guire Acked-by: Marek Vasut Acked-by: Mika Westerberg Acked-by: Boris Brezillon Signed-off-by: Cyrille Pitchen --- diff --git a/drivers/mtd/spi-nor/intel-spi.c b/drivers/mtd/spi-nor/intel-spi.c index e43ce63881a6..986a3d020a3a 100644 --- a/drivers/mtd/spi-nor/intel-spi.c +++ b/drivers/mtd/spi-nor/intel-spi.c @@ -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;