From 011de1b1db534b0ab4ad8099b99c12a17e7c68e0 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Mon, 13 Feb 2017 09:14:21 +0100 Subject: [PATCH] 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 --- drivers/mtd/spi-nor/intel-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5