All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: linux-mmc@vger.kernel.org, linux-renesas-soc@vger.kernel.org,
	Dan Carpenter <dan.carpenter@oracle.com>
Subject: Re: [PATCH] mmc: renesas_sdhi: initialize variable properly when tuning
Date: Tue, 30 Nov 2021 16:41:45 +0100	[thread overview]
Message-ID: <CAPDyKFrW51fsQ_3bULiSqnJdnok37xcYkvWsxKLm0=vXdCG-8A@mail.gmail.com> (raw)
In-Reply-To: <20211130132309.18246-1-wsa+renesas@sang-engineering.com>

On Tue, 30 Nov 2021 at 14:23, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
>
> 'cmd_error' is not necessarily initialized on some error paths in
> mmc_send_tuning(). Initialize it.
>
> Fixes: 2c9017d0b5d3 ("mmc: renesas_sdhi: abort tuning when timeout detected")
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>
> Tested on a Salvator-XS (R-Car M3N), tuning still works.
>
> Ulf, this is a bugfix, can you take it via your tree for this cycle
> please?
>
>  drivers/mmc/host/renesas_sdhi_core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c
> index a4407f391f66..f5b2684ad805 100644
> --- a/drivers/mmc/host/renesas_sdhi_core.c
> +++ b/drivers/mmc/host/renesas_sdhi_core.c
> @@ -673,7 +673,7 @@ static int renesas_sdhi_execute_tuning(struct mmc_host *mmc, u32 opcode)
>
>         /* Issue CMD19 twice for each tap */
>         for (i = 0; i < 2 * priv->tap_num; i++) {
> -               int cmd_error;
> +               int cmd_error = 0;
>
>                 /* Set sampling clock position */
>                 sd_scc_write32(host, priv, SH_MOBILE_SDHI_SCC_TAPSET, i % priv->tap_num);
> --
> 2.30.2
>

  reply	other threads:[~2021-11-30 15:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 13:23 [PATCH] mmc: renesas_sdhi: initialize variable properly when tuning Wolfram Sang
2021-11-30 15:41 ` Ulf Hansson [this message]
2021-12-01 10:25 ` Geert Uytterhoeven

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='CAPDyKFrW51fsQ_3bULiSqnJdnok37xcYkvWsxKLm0=vXdCG-8A@mail.gmail.com' \
    --to=ulf.hansson@linaro.org \
    --cc=dan.carpenter@oracle.com \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=wsa+renesas@sang-engineering.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.