We should not return a -ve error code from command functions. Instead,
return CMD_RET_FAILURE. This avoids the "exit not allowed from main input
shell" error messages from the hush shell.
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
if (ret)
printf("Failure changing bus number (%d)\n", ret);
}
- return ret;
+
+ return ret ? CMD_RET_FAILURE : 0;
}
#endif /* defined(CONFIG_SYS_I2C) */
if (ret)
printf("Failure changing bus speed (%d)\n", ret);
}
- return ret;
+
+ return ret ? CMD_RET_FAILURE : 0;
}
/**