cmd_nand: drop duplicate NULL ptr check
PATCH 1/1 cmd_nand: drop duplicate NULL ptr check
The first if statement checks for NULL ptrs, so there is no need to check it again in later else cases (such as .oob).
Signed-off-by Mike Frysinger <[email protected]>
CC Scott Wood <[email protected]>
--- common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
common/cmd_nand.c +1 -1
@@ -390,7 +390,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])else ret =nand_write_skip_bad (nand, off, &size, (u_char *)addr); - }else if (s !=NULL && !strcmp (s,".oob" )) { + }else if (!strcmp (s,".oob" )) {/* out-of-band data */ mtd_oob_ops_t ops = { .oobbuf = (u8 *)addr,
Signature · 1 line
1.6.2.2
Wolfgang Denk
AppliedPATCH 1/1 cmd_nand: drop duplicate NULL ptr check
Dear Mike Frysinger,
Quoted 8 lines · In message <[email protected]> you wrote:
The first if statement checks for NULL ptrs, so there is no need to check it again in later else cases (such as .oob).
Signed-off-by Mike Frysinger <[email protected]>CC Scott Wood <[email protected]>--- common/cmd_nand.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Applied, thanks.
Best regards,
Wolfgang Denk
Signature · 4 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de If at first you don't succeed, you are running about average.