Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1706316

Re: [PATCH] mmc: wmt-sdmmc: Handle return value of clk_prepare_enable

From Ulf Hansson <ulf.hansson@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] mmc: wmt-sdmmc: Handle return value of clk_prepare_enable
Date 2017-08-08 12:40 +0200
Message-ID <uca5B-71u-43@gated-at.bofh.it> (permalink)
References <uc5yV-3pV-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 8 August 2017 at 07:46, Arvind Yadav <arvind.yadav.cs@gmail.com> wrote:
> clk_prepare_enable() can fail here and we must check its return value.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/wmt-sdmmc.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/wmt-sdmmc.c b/drivers/mmc/host/wmt-sdmmc.c
> index 21ebba8..e64f930 100644
> --- a/drivers/mmc/host/wmt-sdmmc.c
> +++ b/drivers/mmc/host/wmt-sdmmc.c
> @@ -856,7 +856,9 @@ static int wmt_mci_probe(struct platform_device *pdev)
>                 goto fail5;
>         }
>
> -       clk_prepare_enable(priv->clk_sdmmc);
> +       ret = clk_prepare_enable(priv->clk_sdmmc);
> +       if (ret)
> +               goto fail6;
>
>         /* configure the controller to a known 'ready' state */
>         wmt_reset_hardware(mmc);
> @@ -866,6 +868,8 @@ static int wmt_mci_probe(struct platform_device *pdev)
>         dev_info(&pdev->dev, "WMT SDHC Controller initialized\n");
>
>         return 0;
> +fail6:
> +       clk_put(priv->clk_sdmmc);
>  fail5:
>         free_irq(dma_irq, priv);
>  fail4:
> --
> 1.9.1
>

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] mmc: wmt-sdmmc: Handle return value of clk_prepare_enable Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-08 07:50 +0200
  Re: [PATCH] mmc: wmt-sdmmc: Handle return value of clk_prepare_enable Ulf Hansson <ulf.hansson@linaro.org> - 2017-08-08 12:40 +0200

csiph-web