diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-02-23 14:15:32 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-02-26 11:33:02 -0500 |
commit | ed2da6270ed9ea37d39e9ab597fc5b3b4215ae2a (patch) | |
tree | e94c9ff12e64271f1ddd10feca2ba2f505780b12 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | b89c7695b14f58686ac89d5add861f1f6d3fd4da (diff) |
mlxsw: spectrum_kvdl: avoid uninitialized variable warning
gcc warns that 'resource_id' is not initialized if we don't come though
any of the three 'case' statements before:
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c: In function 'mlxsw_sp_kvdl_part_init':
drivers/net/ethernet/mellanox/mlxsw/spectrum_kvdl.c:275:8: error: 'resource_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]
In the current code, that won't happen, but it's more robust to explicitly
handle this by returning a failure from mlxsw_sp_kvdl_part_init.
Fixes: 887839e6960d ("mlxsw: spectrum_kvdl: Add support for dynamic partition set")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions