diff mbox series

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

Message ID 46edc78f8fbd21ab1a4f2313d634f4dd1b5bf2bd.1510228199.git.baruch@tkos.co.il
State Changes Requested
Delegated to: Jagannadha Sutradharudu Teki
Headers show
Series [U-Boot] cmd: sf: remove useless pointer assignment | expand

Commit Message

Baruch Siach Nov. 9, 2017, 11:49 a.m. UTC
The 'flash' pointer is assigned unconditionally a few lines below, and is not
used before that.

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

Comments

Lukasz Majewski Nov. 10, 2017, 12:09 p.m. UTC | #1
On Thu,  9 Nov 2017 13:49:59 +0200
Baruch Siach <baruch@tkos.co.il> wrote:

> The 'flash' pointer is assigned unconditionally a few lines below,
> and is not used before that.
> 
> Signed-off-by: Baruch Siach <baruch@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",

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de
diff mbox series

Patch

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",