spi: Correct two error return values
[platform/kernel/u-boot.git] / drivers / mtd / spi / spi_flash.c
index 3c365d5..2ae2e3c 100644 (file)
@@ -989,7 +989,7 @@ int spi_flash_scan(struct spi_flash *flash)
        ret = spi_flash_cmd(spi, CMD_READ_ID, idcode, sizeof(idcode));
        if (ret) {
                printf("SF: Failed to get idcodes\n");
-               return -EINVAL;
+               return ret;
        }
 
 #ifdef DEBUG