Commit dfc99e143fca44a492918ac6cf3f76ee9c2473a9

Authored by Mike Frysinger
Committed by Wolfgang Denk
1 parent 7732cef2ee

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 <vapier@gentoo.org>
CC: Scott Wood <scottwood@freescale.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -390,7 +390,7 @@
390 390 else
391 391 ret = nand_write_skip_bad(nand, off, &size,
392 392 (u_char *)addr);
393   - } else if (s != NULL && !strcmp(s, ".oob")) {
  393 + } else if (!strcmp(s, ".oob")) {
394 394 /* out-of-band data */
395 395 mtd_oob_ops_t ops = {
396 396 .oobbuf = (u8 *)addr,