mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-07 21:33:54 +00:00
fix(mmc): initialises response buffer with zeros
if ops->send_cmd in mmc_send_cmd returns a non-zero value, r_data (resp_data in mmc_device_state) is never populated, so the while condition in mmc_device_state would end up reading the uninitialized resp_data buffer Signed-off-by: Anand Saminathan <anans@google.com> Change-Id: I72d752867c537d49e111e6d149c3cca122f7dc9f
This commit is contained in:
parent
cc933e1d12
commit
b1a2c51a08
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ static int mmc_send_cmd(unsigned int idx, unsigned int arg,
|
|||
static int mmc_device_state(void)
|
||||
{
|
||||
int retries = MMC_DEFAULT_MAX_RETRIES;
|
||||
unsigned int resp_data[4];
|
||||
unsigned int resp_data[4] = {0};
|
||||
|
||||
do {
|
||||
int ret;
|
||||
|
|
Loading…
Add table
Reference in a new issue