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


Lad Prabhakar
 

Hi Pavel,

Thank you for the review.

-----Original Message-----
From: Pavel Machek <pavel@...>
Sent: 31 March 2022 11:20
To: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@...>
Cc: cip-dev@...; Nobuhiro Iwamatsu
<nobuhiro1.iwamatsu@...>; Pavel Machek <pavel@...>; Biju Das
<biju.das.jz@...>
Subject: Re: [PATCH 5.10.y-cip 21/39] mmc: renesas_sdhi: do hard reset if
possible

Hi!

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
directly.
Yes you are right this needs to land into appropriate error path.

Cheers,
Prabhakar

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

Join {cip-dev@lists.cip-project.org to automatically receive all group messages.