Skip to content

Commit 1a0009a

Browse files
committed
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: 50b823f ("platform: mellanox: mlx-platform: Move bus shift assignment out of the loop") Cc: Vadim Pasternak <[email protected]> Cc: Michael Shych <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e8059d3 commit 1a0009a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/platform/x86/mlx-platform.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5980,7 +5980,7 @@ MODULE_DEVICE_TABLE(dmi, mlxplat_dmi_table);
59805980
static int mlxplat_mlxcpld_verify_bus_topology(int *nr)
59815981
{
59825982
struct i2c_adapter *search_adap;
5983-
int shift, i;
5983+
int i, shift = 0;
59845984

59855985
/* Scan adapters from expected id to verify it is free. */
59865986
*nr = MLXPLAT_CPLD_PHYS_ADAPTER_DEF_NR;

0 commit comments

Comments
 (0)