Unverified Commit 214509e5 authored by Colin Ian King's avatar Colin Ian King Committed by Ilpo Järvinen
Browse files

platform/x86: thinkpad_acpi: remove redundant assignment to variable i



The variable i is being initialized with the value 0 that is never
read, it is being re-assigned 0 again in a for-loop statement later
on. The initialization is redundant and can be removed.

The initialization of variable n can also be deferred after the
sanity check on pointer n and the declaration of all the int variables
can be combined as a final code clear-up.

Cleans up clang scan build warning:
warning: Value stored to 'i' is never read [deadcode.DeadStores]

Signed-off-by: default avatarColin Ian King <colin.i.king@gmail.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20240106154740.55202-1-colin.i.king@gmail.com


Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
parent 6613476e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment