From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j1DUC-0006D7-SO for barebox@lists.infradead.org; Mon, 10 Feb 2020 18:08:50 +0000 From: Ahmad Fatoum Date: Mon, 10 Feb 2020 19:08:30 +0100 Message-Id: <20200210180833.22153-1-a.fatoum@pengutronix.de> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH 1/5] mci: stm32_sdmmc2: don't ignore reset_control_get errors To: barebox@lists.infradead.org Cc: Ahmad Fatoum 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 --- drivers/mci/stm32_sdmmc2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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