]> git.sur5r.net Git - u-boot/commitdiff
driver: net: fsl-mc: Return from DPAA_exit if boot_status !=0
authorPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Mon, 21 Mar 2016 08:49:39 +0000 (14:19 +0530)
committerYork Sun <york.sun@nxp.com>
Mon, 21 Mar 2016 19:42:15 +0000 (12:42 -0700)
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@nxp.com>
Reported-by: Yao Yuan <yao.yuan@nxp.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/net/fsl-mc/mc.c

index 53c4966c330e89b7c37d99ca6e8fc54a34f51624..f83bd0c7f0b371510532ee991eb4ba94ae38ad4a 100644 (file)
@@ -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) {