diff --git a/lib/optee/optee.c b/lib/optee/optee.c index 9b49eb8ee7..d4355c6d03 100644 --- a/lib/optee/optee.c +++ b/lib/optee/optee.c @@ -92,7 +92,7 @@ static int optee_copy_firmware_node(const void *old_blob, void *fdt_blob) offs = fdt_add_subnode(fdt_blob, offs, "optee"); if (offs < 0) - return ret; + return offs; /* copy the compatible property */ prop = fdt_getprop(old_blob, old_offs, "compatible", &len);