]> git.sur5r.net Git - u-boot/commitdiff
cmd_nand: drop duplicate NULL ptr check
authorMike Frysinger <vapier@gentoo.org>
Mon, 13 Apr 2009 02:29:20 +0000 (22:29 -0400)
committerWolfgang Denk <wd@denx.de>
Thu, 16 Apr 2009 21:03:44 +0000 (23:03 +0200)
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 <vapier@gentoo.org>
CC: Scott Wood <scottwood@freescale.com>
common/cmd_nand.c

index e142d7666151718e98162b4c19179b5f6704a8bc..ff5bc6e27d18ecf1367025bd59be59d7070a5601 100644 (file)
@@ -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,