[U-Boot] [PATCH] cmd: sf: remove useless pointer assignment

Baruch Siach baruch at tkos.co.il
Thu Nov 9 11:49:59 UTC 2017


The 'flash' pointer is assigned unconditionally a few lines below, and is not
used before that.

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
---
 cmd/sf.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/cmd/sf.c b/cmd/sf.c
index f971eec781cc..9be8a89bc84c 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -126,7 +126,6 @@ static int do_spi_flash_probe(int argc, char * const argv[])
 	if (!ret) {
 		device_remove(new, DM_REMOVE_NORMAL);
 	}
-	flash = NULL;
 	ret = spi_flash_probe_bus_cs(bus, cs, speed, mode, &new);
 	if (ret) {
 		printf("Failed to initialize SPI flash at %u:%u (error %d)\n",
-- 
2.14.2



More information about the U-Boot mailing list