]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: renesas_sdhi: Get the reset handle early in the probe
authorLad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Fri, 24 Jun 2022 18:14:37 +0000 (19:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Aug 2022 12:23:50 +0000 (14:23 +0200)
commit0d3aa4a9c440acad433b16a70fed77968742ffe4
tree944a11c1e1ecd16560044bd6a1df028f01b76744
parentfaef95c381ef7db653b0d1d6758c109f323c734c
mmc: renesas_sdhi: Get the reset handle early in the probe

[ Upstream commit 2f351880bf7d878480da4278e0ded4982dff5cea ]

In case of devm_reset_control_get_optional_exclusive() failure we returned
directly instead of jumping to the error path to roll back initialization.

This patch moves devm_reset_control_get_optional_exclusive() early in the
probe so that we have the reset handle prior to initialization of the
hardware.

Fixes: e829d79509811 ("mmc: renesas_sdhi: do hard reset if possible")
Reported-by: Pavel Machek <pavel@denx.de>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20220624181438.4355-2-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mmc/host/renesas_sdhi_core.c