Skip to content
Commit cf9f3806 authored by Wolfgang Wallner's avatar Wolfgang Wallner Committed by Bin Meng
Browse files

x86: mtrr: Fix parsing of "mtrr list" command



The command 'mtrr' does not recognize the 'list' subcommand any more
since the code restructuring in commit b2a76b3f ("x86: mtrr:
Restructure so command execution is in one place").

The if-else parsing the command arguments does not take 'list' into
account: the if-branch is intended for no subcommands, the else-branch
is intended for the non-list subcommands (which all expect additional
arguments). Calling the 'mtrr list' subcommand leads to a "return
CMD_RET_USAGE" in the else-branch.

Fix this by changing the else-branch to explicitly checking for
if (cmd != 'l').

Fixes: b2a76b3f ("x86: mtrr: Restructure so command execution is in one place")
Signed-off-by: default avatarWolfgang Wallner <wolfgang.wallner@br-automation.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarBin Meng <bmeng.cn@gmail.com>
Tested-by: default avatarBin Meng <bmeng.cn@gmail.com>
parent 23e333a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment