mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-17 22:05:08 +00:00
i2c: amd-asf: Fix uninitialized variables issue in amd_asf_process_target
The len variable is not initialized, which may cause the for loop to behave unexpectedly. Fixes: 9b25419ad397 ("i2c: amd-asf: Add routine to handle the ASF slave process") Signed-off-by: Qianqiang Liu <qianqiang.liu@163.com> Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org> Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com> Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
This commit is contained in:
parent
63ae99f7e6
commit
a5089cd23b
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user