Skip to content

Commit

Permalink
powerpc: cmd_ecctest: Use return value of cmd_usage
Browse files Browse the repository at this point in the history
Use the return value of cmd_usage instead of ignoring this
and returning a 1.

Signed-off-by: Thomas Weber <[email protected]>
Acked-by: Mike Frysinger <[email protected]>
  • Loading branch information
Thomas Weber authored and wdenx committed Nov 27, 2010
1 parent fd2aa8e commit e03dabe
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions arch/powerpc/cpu/ppc4xx/cmd_ecctest.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,15 +190,13 @@ static int do_ecctest(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int error;

if (argc < 3) {
cmd_usage(cmdtp);
return 1;
return cmd_usage(cmdtp);
}

ptr = (u32 *)simple_strtoul(argv[1], NULL, 16);
error = simple_strtoul(argv[2], NULL, 16);
if ((error < 1) || (error > 2)) {
cmd_usage(cmdtp);
return 1;
return cmd_usage(cmdtp);
}

printf("Using address %p for %d bit ECC error injection\n",
Expand Down

0 comments on commit e03dabe

Please sign in to comment.