platform: mellanox: mlx-platform: Initialize shift variable to 0
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2196494 commit 1a0009abfa7893b9cfcd3884658af1cbee6b26ce Author: Hans de Goede <hdegoede@redhat.com> Date: Tue Mar 7 11:58:42 2023 +0100 platform: mellanox: mlx-platform: Initialize shift variable to 0 Initialize shift variable in mlxplat_mlxcpld_verify_bus_topology() to 0 to avoid the following compile error: drivers/platform/x86/mlx-platform.c:6013 mlxplat_mlxcpld_verify_bus_topology() error: uninitialized symbol 'shift'. Fixes: 50b823fdd357 ("platform: mellanox: mlx-platform: Move bus shift assignment out of the loop") Cc: Vadim Pasternak <vadimp@nvidia.com> Cc: Michael Shych <michaelsh@nvidia.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Link: https://lore.kernel.org/r/20230307105842.286118-1-hdegoede@redhat.com Signed-off-by: Ivan Vecera <ivecera@redhat.com>
This commit is contained in:
parent
782488875e
commit
e9a1df0e51
|
@ -5980,7 +5980,7 @@ MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
|
||||||
static int mlxplat_mlxcpld_verify_bus_topology(int *nr)
|
static int mlxplat_mlxcpld_verify_bus_topology(int *nr)
|
||||||
{
|
{
|
||||||
struct i2c_adapter *search_adap;
|
struct i2c_adapter *search_adap;
|
||||||
int shift, i;
|
int i, shift = 0;
|
||||||
|
|
||||||
/* Scan adapters from expected id to verify it is free. */
|
/* Scan adapters from expected id to verify it is free. */
|
||||||
*nr = MLXPLAT_CPLD_PHYS_ADAPTER_DEF_NR;
|
*nr = MLXPLAT_CPLD_PHYS_ADAPTER_DEF_NR;
|
||||||
|
|
Loading…
Reference in New Issue