Commit 5f9984ef authored by Yann Gautier's avatar Yann Gautier
Browse files

mmc: correctly check ret in mmc_fill_device_info

In patch 93768644

, ret will be MMC_STATE_TRAN (=4), which is a valid value.
We shouldn't exit the function in that case, but only if ret is < 0.

Change-Id: I776693fe847b6b45190af028f12d2e724ca46399
Signed-off-by: default avatarYann Gautier <yann.gautier@st.com>
parent cd1f39b4
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
* Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
......@@ -300,7 +300,7 @@ static int mmc_fill_device_info(void)
break;
}
if (ret != 0) {
if (ret < 0) {
return ret;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment