summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorNicholas Mc Guire <der.herr@hofr.at>2017-02-13 09:14:21 +0100
committerCyrille Pitchen <cyrille.pitchen@atmel.com>2017-03-07 22:09:56 +0100
commit011de1b1db534b0ab4ad8099b99c12a17e7c68e0 (patch)
tree79978a2be4aaf36aeb04d3cb5d5d9d7ee0a66071 /drivers/mtd
parentmtd: spi-nor: intel: use true/false for boolean (diff)
downloadlinux-011de1b1db534b0ab4ad8099b99c12a17e7c68e0.tar.xz
linux-011de1b1db534b0ab4ad8099b99c12a17e7c68e0.zip
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 <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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/spi-nor/intel-spi.c2
1 files changed, 1 insertions, 1 deletions
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;