All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] optee: Replace uninitialized return variable by proper one.
@ 2020-01-26 22:20 Christoph Müllner
  2020-01-27  7:05 ` Heiko Stuebner
  2020-01-31  1:41 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Müllner @ 2020-01-26 22:20 UTC (permalink / raw)
  To: u-boot

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 <christoph.muellner@theobroma-systems.com>

---

 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);
-- 
2.24.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] optee: Replace uninitialized return variable by proper one.
  2020-01-26 22:20 [PATCH] optee: Replace uninitialized return variable by proper one Christoph Müllner
@ 2020-01-27  7:05 ` Heiko Stuebner
  2020-01-31  1:41 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2020-01-27  7:05 UTC (permalink / raw)
  To: u-boot

Am Sonntag, 26. Januar 2020, 23:20:54 CET schrieb 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 <christoph.muellner@theobroma-systems.com>

Thanks for catching this mistake of mine
Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>


> 
> ---
> 
>  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);
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] optee: Replace uninitialized return variable by proper one.
  2020-01-26 22:20 [PATCH] optee: Replace uninitialized return variable by proper one Christoph Müllner
  2020-01-27  7:05 ` Heiko Stuebner
@ 2020-01-31  1:41 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2020-01-31  1:41 UTC (permalink / raw)
  To: u-boot

On Sun, Jan 26, 2020 at 11:20:54PM +0100, Christoph Müllner wrote:

> 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 <christoph.muellner@theobroma-systems.com>
> Reviewed-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>

Applied to u-boot/master, thanks!

-- 
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-31  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-26 22:20 [PATCH] optee: Replace uninitialized return variable by proper one Christoph Müllner
2020-01-27  7:05 ` Heiko Stuebner
2020-01-31  1:41 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.