]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
mtd: spi: Return 0 instead of NULL
authorMichal Simek <michal.simek@xilinx.com>
Tue, 13 Jan 2015 09:59:52 +0000 (10:59 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 21 Jan 2015 08:44:13 +0000 (09:44 +0100)
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 <michal.simek@xilinx.com>
drivers/mtd/spi/sf_probe.c

index 1aeb07c79e8b1430dd7faaf675adc2a5822b1e19..41abe8100f282500066ce47f610e4c8653849916 100644 (file)
@@ -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;
                }