Incorrect command is already handled and FPGA_NONE should be used only
one. In case of error CMD_RET_USAGE can be returned directly without any
addition logic around.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
if (dev == FPGA_INVALID_DEVICE) {
puts("FPGA device not specified\n");
- op = FPGA_NONE;
+ return CMD_RET_USAGE;
}
switch (op) {
- case FPGA_NONE:
case FPGA_INFO:
break;
#if defined(CONFIG_CMD_FPGA_LOADFS)
if (wrong_parms) {
puts("Wrong parameters for FPGA request\n");
- op = FPGA_NONE;
+ return CMD_RET_USAGE;
}
switch (op) {
- case FPGA_NONE:
- return CMD_RET_USAGE;
-
case FPGA_INFO:
rc = fpga_info(dev);
break;