public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Xavier Drudis Ferran <xdrudis@tinet.cat>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Tom Rini <trini@konsulko.com>,
	Xavier Drudis Ferran <xdrudis@tinet.cat>,
	Sean Anderson <sean.anderson@seco.com>,
	Mayuresh Chitale <mchitale@ventanamicro.com>,
	Simon Glass <sjg@chromium.org>,
	u-boot@lists.denx.de
Subject: Re: [PATCH 1/1] spl: undefined return value in spl_blk_load_image
Date: Wed, 6 Sep 2023 19:55:58 +0200	[thread overview]
Message-ID: <ZPi9LmISZUAZ77ss@xdrudis.tinet.cat> (raw)
In-Reply-To: <20230906122511.96787-1-heinrich.schuchardt@canonical.com>

El Wed, Sep 06, 2023 at 02:25:11PM +0200, Heinrich Schuchardt deia:
> spl_blk_load_image() should not return an uninitialized value if
> blk_get_devnum_by_uclass_id() fails.
> 
> Fixes: 8ce6a2e17577 ("spl: blk: Support loading images from fs")
> Reported-by: Xavier Drudis Ferran <xdrudis@tinet.cat>

FWIW:

Reviewed-by:  Xavier Drudis Ferran <xdrudis@tinet.cat>


> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
> ---
>  common/spl/spl_blk_fs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/common/spl/spl_blk_fs.c b/common/spl/spl_blk_fs.c
> index eb6f526689..ea5d1a51d9 100644
> --- a/common/spl/spl_blk_fs.c
> +++ b/common/spl/spl_blk_fs.c
> @@ -53,7 +53,7 @@ int spl_blk_load_image(struct spl_image_info *spl_image,
>  	blk_desc = blk_get_devnum_by_uclass_id(uclass_id, devnum);
>  	if (!blk_desc) {
>  		printf("blk desc for %d %d not found\n", uclass_id, devnum);
> -		goto out;
> +		return -ENODEV;
>  	}
>  
>  	blk_show_device(uclass_id, devnum);
> -- 
> 2.40.1
> 

      reply	other threads:[~2023-09-06 17:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-06 12:25 [PATCH 1/1] spl: undefined return value in spl_blk_load_image Heinrich Schuchardt
2023-09-06 17:55 ` Xavier Drudis Ferran [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZPi9LmISZUAZ77ss@xdrudis.tinet.cat \
    --to=xdrudis@tinet.cat \
    --cc=heinrich.schuchardt@canonical.com \
    --cc=mchitale@ventanamicro.com \
    --cc=sean.anderson@seco.com \
    --cc=sjg@chromium.org \
    --cc=trini@konsulko.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox