From: Brad Larson <blarson@amd.com>
To: <christophe.jaillet@wanadoo.fr>
Cc: <adrian.hunter@intel.com>, <blarson@amd.com>,
<kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-mmc@vger.kernel.org>, <p.zabel@pengutronix.de>,
<ulf.hansson@linaro.org>
Subject: Re: [PATCH] mmc: sdhci-cadence: Fix an error handling path in sdhci_cdns_probe()
Date: Tue, 25 Apr 2023 13:06:00 -0700 [thread overview]
Message-ID: <20230425200600.54806-1-blarson@amd.com> (raw)
In-Reply-To: <f61599a9ef23767c2d66e5af9c975f05ef1cec6b.1682430069.git.christophe.jaillet@wanadoo.fr>
On 25/04/23 16:41, Christophe JAILLET wrote:
> If devm_reset_control_get_optional_exclusive() fails, some resources still
> need to be released. So branch to the error handling path instead of
> returning directly.
>
> Fixes: aad53d4ee756 ("mmc: sdhci-cadence: Support mmc hardware reset")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Brad Larson <blarson@amd.com>
> ---
> drivers/mmc/host/sdhci-cadence.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-cadence.c b/drivers/mmc/host/sdhci-cadence.c
> index b24aa27da50c..d2f625054689 100644
> --- a/drivers/mmc/host/sdhci-cadence.c
> +++ b/drivers/mmc/host/sdhci-cadence.c
> @@ -540,9 +540,11 @@ static int sdhci_cdns_probe(struct platform_device *pdev)
>
> if (host->mmc->caps & MMC_CAP_HW_RESET) {
> priv->rst_hw = devm_reset_control_get_optional_exclusive(dev, NULL);
> - if (IS_ERR(priv->rst_hw))
> - return dev_err_probe(mmc_dev(host->mmc), PTR_ERR(priv->rst_hw),
> - "reset controller error\n");
> + if (IS_ERR(priv->rst_hw)) {
> + ret = dev_err_probe(mmc_dev(host->mmc), PTR_ERR(priv->rst_hw),
> + "reset controller error\n");
> + goto free;
> + }
> if (priv->rst_hw)
> host->mmc_host_ops.card_hw_reset = sdhci_cdns_mmc_hw_reset;
> }
next prev parent reply other threads:[~2023-04-25 20:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-25 13:41 Christophe JAILLET
2023-04-25 19:04 ` Adrian Hunter
2023-04-25 20:06 ` Brad Larson [this message]
2023-05-02 14:32 ` Ulf Hansson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230425200600.54806-1-blarson@amd.com \
--to=blarson@amd.com \
--cc=adrian.hunter@intel.com \
--cc=christophe.jaillet@wanadoo.fr \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=ulf.hansson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®