mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 1/5] mci: stm32_sdmmc2: don't ignore reset_control_get errors
Date: Wed, 12 Feb 2020 08:36:04 +0100	[thread overview]
Message-ID: <20200212073604.zl6yh6zbcqqo2fph@pengutronix.de> (raw)
In-Reply-To: <20200210180833.22153-1-a.fatoum@pengutronix.de>

On Mon, Feb 10, 2020 at 07:08:30PM +0100, Ahmad Fatoum wrote:
> reset_control_get returns a NULL pointer when no resets were specified
> via device tree properties. If there's a malformed "resets"-property, we
> get an error pointer. This error should be propagated, only the NULL
> returns are the ones we can safely ignore.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  drivers/mci/stm32_sdmmc2.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mci/stm32_sdmmc2.c b/drivers/mci/stm32_sdmmc2.c
> index 44f7e6239949..695e61d1ccd7 100644
> --- a/drivers/mci/stm32_sdmmc2.c
> +++ b/drivers/mci/stm32_sdmmc2.c
> @@ -622,7 +622,7 @@ static int stm32_sdmmc2_probe(struct amba_device *adev,
>  
>  	priv->reset_ctl = reset_control_get(dev, NULL);
>  	if (IS_ERR(priv->reset_ctl))
> -		priv->reset_ctl = NULL;
> +		return PTR_ERR(priv->reset_ctl);
>  
>  	mci->f_min = 400000;
>  	/* f_max is taken from kernel v5.3 variant_stm32_sdmmc */
> -- 
> 2.25.0
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      parent reply	other threads:[~2020-02-12  7:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-10 18:08 Ahmad Fatoum
2020-02-10 18:08 ` [PATCH 2/5] net: designware: socfpga: fix possible invalid pointer deref Ahmad Fatoum
2020-02-10 18:08 ` [PATCH 3/5] watchdog: dw_wdt: inform user on missing reset control line Ahmad Fatoum
2020-02-10 18:08 ` [PATCH 4/5] watchdog: dw_wdt: remove duplicated error message Ahmad Fatoum
2020-02-10 18:08 ` [PATCH 5/5] i2c: tegra: correct " Ahmad Fatoum
2020-02-12  7:36 ` Sascha Hauer [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=20200212073604.zl6yh6zbcqqo2fph@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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