]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/hush.c
cmd_usage(): simplify return code handling
[karo-tx-uboot.git] / common / hush.c
index 8a74d225e9dd725bc333da662076801af88eb963..4dd9513b0365475d06c6ee8d98cf8a3e77332f79 100644 (file)
@@ -1694,10 +1694,8 @@ static int run_pipe_real(struct pipe *pi)
                                }
 #endif
                                /* found - check max args */
-                               if ((child->argc - i) > cmdtp->maxargs) {
-                                       cmd_usage(cmdtp);
-                                       return -1;
-                               }
+                               if ((child->argc - i) > cmdtp->maxargs)
+                                       return cmd_usage(cmdtp);
 #endif
                                child->argv+=i;  /* XXX horrible hack */
 #ifndef __U_BOOT__