From: Michal Simek Date: Tue, 13 Jan 2015 09:59:52 +0000 (+0100) Subject: mtd: spi: Return 0 instead of NULL X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3d5f89cf60ad7e5bf78b8e62d2b93664a98920bd;p=thirdparty%2Fu-boot.git mtd: spi: Return 0 instead of NULL This patch remove warning: drivers/mtd/spi/sf_probe.c: In function 'spi_flash_validate_params': drivers/mtd/spi/sf_probe.c:215:4: warning: return makes integer from pointer without a cast [enabled by default] return NULL; ^ drivers/mtd/spi/sf_probe.c:223:5: warning: return makes integer from pointer without a cast [enabled by default] return NULL; ^ Signed-off-by: Michal Simek --- diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c index 1aeb07c79e8..41abe8100f2 100644 --- a/drivers/mtd/spi/sf_probe.c +++ b/drivers/mtd/spi/sf_probe.c @@ -212,7 +212,7 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode, (flash->write_cmd == CMD_QUAD_PAGE_PROGRAM)) { if (spi_flash_set_qeb(flash, idcode[0])) { debug("SF: Fail to set QEB for %02x\n", idcode[0]); - return NULL; + return 0; } #ifdef CONFIG_SF_DUAL_FLASH if (flash->dual_flash & SF_DUAL_STACKED_FLASH) { @@ -220,7 +220,7 @@ static int spi_flash_validate_params(struct spi_slave *spi, u8 *idcode, if (spi_flash_set_qeb(flash, idcode[0])) { debug("SF: Fail to set QEB Upper Flash %02x\n", idcode[0]); - return NULL; + return 0; } flash->spi->flags &= ~SPI_XFER_U_PAGE; }