[U-Boot] [PATCH][v2] driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0
Prabhakar Kushwaha
prabhakar.kushwaha at nxp.com
Mon Mar 21 09:49:39 CET 2016
Return value of get_mc_boot_status() in case of failure is not necessary
to be -1.
So update the error condition check.
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha at nxp.com>
Reported-by: Yao Yuan <yao.yuan at nxp.com>
---
Changes for v2: Incorporated York's comments
- Added comments
drivers/net/fsl-mc/mc.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 53c4966..f83bd0c 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -1147,7 +1147,8 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
{
int err = 0;
- if (bd && get_mc_boot_status() == -1)
+ /* MC is not loaded intentionally, So return success. */
+ if (bd && get_mc_boot_status() != 0)
return 0;
if (bd && !get_mc_boot_status() && get_dpl_apply_status() == -1) {
--
1.9.1
More information about the U-Boot
mailing list