optee: Replace uninitialized return variable by proper one.
PATCH 1/1 optee: Replace uninitialized return variable by proper one.
As hinted by GCC 9, there is a return statement that returns an uninitialized variable in optee_copy_firmware_node(). This patch addresses this.
---
lib/optee/optee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/optee/optee.c +1 -1
@@ -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);
Signature · 1 line
2.24.1
PATCH 1/1 optee: Replace uninitialized return variable by proper one.
Am Sonntag, 26. Januar 2020, 23:20:54 CET schrieb Christoph Müllner:
Quoted 5 lines
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 <[email protected]>
Thanks for catching this mistake of mine
Quoted 20 lines
---
lib/optee/optee.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/optee/optee.c +1
-1@@ -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);
PATCH 1/1 optee: Replace uninitialized return variable by proper one.
In reply to Christoph MüllnerQuoted 6 lines · Christoph Müllner
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 <[email protected]>Reviewed-by Heiko Stuebner <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: not available URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200130/7169af9b/attachment.sig>