diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2021-10-06 10:33:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-06 17:23:02 +0300 |
commit | 9b139a38016ff849238ac1788f30c8a6b1cbc357 (patch) | |
tree | 814a90ea511d93e4212a590fc4628535da3edb30 /drivers | |
parent | 5b71131b795f3e1a0896bf0514fa9f9047d6a077 (diff) | |
download | linux-9b139a38016ff849238ac1788f30c8a6b1cbc357.tar.xz |
mlxsw: spectrum_buffers: silence uninitialized warning
Static checkers and runtime checkers such as KMSan will complain that
we do not initialize the last 6 bytes of "cb_priv". The caller only
uses the first two bytes so it doesn't cause a runtime issue. Still
worth fixing though.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c index 9de160e740b2..d78cf5a7220a 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c @@ -1583,7 +1583,7 @@ int mlxsw_sp_sb_occ_snapshot(struct mlxsw_core *mlxsw_core, { struct mlxsw_sp *mlxsw_sp = mlxsw_core_driver_priv(mlxsw_core); struct mlxsw_sp_sb_sr_occ_query_cb_ctx cb_ctx; - unsigned long cb_priv; + unsigned long cb_priv = 0; LIST_HEAD(bulk_list); char *sbsr_pl; u8 masked_count; |