]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
driver: fsl-mc: MC object cleanup when DPL not loaded
authorYogesh Gaur <yogeshnarayan.gaur@nxp.com>
Tue, 28 Nov 2017 04:41:14 +0000 (10:11 +0530)
committerYork Sun <york.sun@nxp.com>
Wed, 6 Dec 2017 22:56:31 +0000 (14:56 -0800)
For case when MC is loaded but DPL is not deployed perform MC
object [DPBP, DPIO, DPNI and DPRC] cleanup.

Signed-off-by: Yogesh Gaur <yogeshnarayan.gaur@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
drivers/net/fsl-mc/mc.c

index bf9949b1dd8c520b9dea2decfe744f16c303f63f..f36fe06269d4651f45ae887cd6728c952efee460 100644 (file)
@@ -1436,12 +1436,13 @@ int fsl_mc_ldpaa_exit(bd_t *bd)
         */
        if (bd && mc_boot_status && !is_dpl_apply_status) {
                printf("fsl-mc: DPL not deployed, DPAA2 ethernet not work\n");
-               return 0;
+               goto mc_obj_cleanup;
        }
 
        if (bd && mc_boot_status && is_dpl_apply_status)
                return 0;
 
+mc_obj_cleanup:
        err = dpbp_exit();
        if (err < 0) {
                printf("dpbp_exit() failed: %d\n", err);