public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
To: Qianqiang Liu <qianqiang.liu@163.com>,
	Dan Carpenter <dan.carpenter@linaro.org>
Cc: andi.shyti@kernel.org, linux-i2c@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] i2c: amd-asf: Fix uninitialized variables issue in amd_asf_process_target
Date: Mon, 30 Sep 2024 10:03:23 +0530	[thread overview]
Message-ID: <a69cd7b2-b74b-4ea2-9235-8f0958777c27@amd.com> (raw)
In-Reply-To: <Zva0dBAZWpd1e4as@iZbp1asjb3cy8ks0srf007Z>

Hi,

On 9/27/2024 19:04, Qianqiang Liu wrote:
> The len variable is not initialized, which may cause the for loop to
> behave unexpectedly.
> 
> Fixes: 20c3cc299218 ("i2c: amd-asf: Add routine to handle the ASF slave process")
> Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com>

Thank you for the fix.

Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>

Thanks,
Shyam

> ---
>  drivers/i2c/busses/i2c-amd-asf-plat.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/busses/i2c-amd-asf-plat.c b/drivers/i2c/busses/i2c-amd-asf-plat.c
> index 47e0c90341aed..ba47df5370c72 100644
> --- a/drivers/i2c/busses/i2c-amd-asf-plat.c
> +++ b/drivers/i2c/busses/i2c-amd-asf-plat.c
> @@ -61,7 +61,7 @@ static void amd_asf_process_target(struct work_struct *work)
>  	unsigned short piix4_smba = dev->port_addr->start;
>  	u8 data[ASF_BLOCK_MAX_BYTES];
>  	u8 bank, reg, cmd;
> -	u8 len, idx, val;
> +	u8 len = 0, idx, val;
>  
>  	/* Read target status register */
>  	reg = inb_p(ASFSLVSTA);

  parent reply	other threads:[~2024-09-30  4:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-26 15:13 [PATCH] i2c: amd-asf: Fix uninitialized variables issue in amd_asf_process_target Qianqiang Liu
2024-09-27 10:32 ` Dan Carpenter
2024-09-27 13:34   ` [PATCH v2] " Qianqiang Liu
2024-09-27 13:37     ` Dan Carpenter
2024-09-30  4:33     ` Shyam Sundar S K [this message]
2024-10-01  5:57       ` Qianqiang Liu
2024-10-01 13:25     ` Andi Shyti

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=a69cd7b2-b74b-4ea2-9235-8f0958777c27@amd.com \
    --to=shyam-sundar.s-k@amd.com \
    --cc=andi.shyti@kernel.org \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=qianqiang.liu@163.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox