Skip to content
Snippets Groups Projects
Commit ed80c931 authored by Taylor Hutt's avatar Taylor Hutt Committed by Andy Fleming
Browse files

mmc: Fix incorrect handling of 'read' & 'write' commands


If a malformed 'read' or 'write' command is issued, the Sandbox U-Boot
can crash because the command-handling code does no error checking on
the number of provided arguments.

This change makes the mmc 'erase', 'read' and 'write' commands only
function if the proper number of arguments are supplied.

Also puts the else assignment at the beginning fo the if() statement
to shortens the generated code.  This removes an unnecessary jump from
the generated code.

Signed-off-by: default avatarTaylor Hutt <thutt@chromium.org>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarAndy Fleming <afleming@freescale.com>
parent 19815399
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment