[PATCH master 13/14] mci: dw_mmc: make reset optional

Ahmad Fatoum a.fatoum at pengutronix.de
Tue Apr 11 00:14:35 PDT 2023


The reset is optional, so no point in warning about it unless there
was an actual error getting the reset.

reset_control_get_optional() reports the case of no reset being
specified by returning NULL, so use that instead.

Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
 drivers/mci/dw_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mci/dw_mmc.c b/drivers/mci/dw_mmc.c
index 8f3317deb51a..73a8ebbc152e 100644
--- a/drivers/mci/dw_mmc.c
+++ b/drivers/mci/dw_mmc.c
@@ -570,7 +570,7 @@ static int dw_mmc_probe(struct device *dev)
 	clk_enable(host->clk_biu);
 	clk_enable(host->clk_ciu);
 
-	rst = reset_control_get(dev, "reset");
+	rst = reset_control_get_optional(dev, "reset");
 	if (IS_ERR(rst)) {
 		dev_warn(dev, "error claiming reset: %pe\n", rst);
 	} else if (rst) {
-- 
2.39.2




More information about the barebox mailing list