mtd: spi-nor: intel: use ERR_CAST in return statement
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Wed May 10 19:59:14 PDT 2017
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=011de1b1db534b0ab4ad8099b99c12a17e7c68e0
Commit: 011de1b1db534b0ab4ad8099b99c12a17e7c68e0
Parent: 22d61878565916a0f0ff4babe9207365d0dc8bd6
Author: Nicholas Mc Guire <der.herr at hofr.at>
AuthorDate: Mon Feb 13 09:14:21 2017 +0100
Committer: Cyrille Pitchen <cyrille.pitchen at atmel.com>
CommitDate: Tue Mar 7 22:09:56 2017 +0100
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 at hofr.at>
Acked-by: Marek Vasut <marek.vasut at gmail.com>
Acked-by: Mika Westerberg <mika.westerberg at linux.intel.com>
Acked-by: Boris Brezillon <boris.brezillon at free-electrons.com>
Signed-off-by: Cyrille Pitchen <cyrille.pitchen at atmel.com>
---
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 e43ce63..986a3d0 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;
More information about the linux-mtd-cvs
mailing list