From patchwork Sun Jan 26 22:20:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?UTF-8?Q?Christoph_M=c3=bcllner?= X-Patchwork-Id: 240276 List-Id: U-Boot discussion From: christoph.muellner at theobroma-systems.com (=?UTF-8?q?Christoph=20M=C3=BCllner?=) Date: Sun, 26 Jan 2020 23:20:54 +0100 Subject: [PATCH] optee: Replace uninitialized return variable by proper one. Message-ID: <20200126222054.388621-1-christoph.muellner@theobroma-systems.com> As hinted by GCC 9, there is a return statement that returns an uninitialized variable in optee_copy_firmware_node(). This patch addresses this. Signed-off-by: Christoph Müllner Reviewed-by: Heiko Stuebner --- lib/optee/optee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);