]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/karo/common/fdt.c
karo: fdt: fix error handling for reg-can-xcvr
[karo-tx-uboot.git] / board / karo / common / fdt.c
index 7f6ac56298894ec6fe59c92296fbd2e85bbdf4ff..fe3520b8639bcdcb50e51fd6aba7ad912369c707 100644 (file)
@@ -418,10 +418,10 @@ void karo_fdt_fixup_flexcan(void *blob, int xcvr_present)
                debug("Disabling CAN XCVR\n");
                ret = fdt_find_and_setprop(blob, "reg-can-xcvr", "status",
                                        xcvr_status, strlen(xcvr_status) + 1, 1);
-               if (ret == -FDT_ERR_NOTFOUND)
+               if (ret == -FDT_ERR_NOTFOUND || ret == -FDT_ERR_BADPATH)
                        ret = fdt_find_and_setprop(blob, "reg_can_xcvr", "status",
                                                   xcvr_status, strlen(xcvr_status) + 1, 1);
-               if (ret != -FDT_ERR_NOTFOUND)
+               if (ret && ret != -FDT_ERR_NOTFOUND && ret != -FDT_ERR_BADPATH)
                        printf("Failed to disable CAN transceiver switch: %s\n",
                                fdt_strerror(ret));
        }