Re: [PATCH 5.10.y-cip 21/39] mmc: renesas_sdhi: do hard reset if possible

Pavel Machek


commit b4d86f37eacb724690d0d300576b82806bc743d5 upstream.

All recent SDHI instances can be reset via the reset controller. If one
is found, use it instead of the open coded reset. This is to get a
future-proof sane reset state.
+++ b/drivers/mmc/host/renesas_sdhi_core.c
@@ -1086,6 +1097,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
if (ret)
goto efree;

+ priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL);
+ if (IS_ERR(priv->rstc))
+ return PTR_ERR(priv->rstc);
I believe this needs to goto to appropriate error path, not return

Best regards,
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

Join to automatically receive all group messages.