From: Mike Frysinger Date: Mon, 13 Apr 2009 02:29:20 +0000 (-0400) Subject: cmd_nand: drop duplicate NULL ptr check X-Git-Tag: v2009.06-rc1~37 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=dfc99e143fca44a492918ac6cf3f76ee9c2473a9;p=oweals%2Fu-boot.git 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 CC: Scott Wood --- diff --git a/common/cmd_nand.c b/common/cmd_nand.c index e142d76661..ff5bc6e27d 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -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,