diff options
author | Tim Gardner <tim.gardner@canonical.com> | 2021-10-07 06:04:13 -0600 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-10-08 15:18:39 +0100 |
commit | d5ac07dfbd2b7f05d8ff43924dee2f09675dacb3 (patch) | |
tree | 56bbb94df6ce3467d0c08b14aa9813f4a0e5400a /drivers/net/ethernet/qlogic | |
parent | 339e75f6b9a076b3a9c01ab4bdd4f58975098445 (diff) | |
download | linux-d5ac07dfbd2b7f05d8ff43924dee2f09675dacb3.tar.gz linux-d5ac07dfbd2b7f05d8ff43924dee2f09675dacb3.tar.bz2 linux-d5ac07dfbd2b7f05d8ff43924dee2f09675dacb3.zip |
qed: Initialize debug string array
Coverity complains of an uninitialized variable.
CID 120847 (#1 of 1): Uninitialized scalar variable (UNINIT)
3. uninit_use_in_call: Using uninitialized value *sw_platform_str when calling qed_dump_str_param. [show details]
1344 offset += qed_dump_str_param(dump_buf + offset,
1345 dump, "sw-platform", sw_platform_str);
Fix this by removing dead code that references sw_platform_str.
Fixes: 6c95dd8f0aa1d ("qed: Update debug related changes")
Cc: Ariel Elior <aelior@marvell.com>
Cc: GR-everest-linux-l2@marvell.com
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Shai Malin <smalin@marvell.com>
Cc: Omkar Kulkarni <okulkarni@marvell.com>
Cc: Prabhakar Kushwaha <pkushwaha@marvell.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org (open list)
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r-- | drivers/net/ethernet/qlogic/qed/qed_debug.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qed/qed_debug.c b/drivers/net/ethernet/qlogic/qed/qed_debug.c index 6d693ee380f1..f6198b9a1b02 100644 --- a/drivers/net/ethernet/qlogic/qed/qed_debug.c +++ b/drivers/net/ethernet/qlogic/qed/qed_debug.c @@ -1315,7 +1315,6 @@ static u32 qed_dump_common_global_params(struct qed_hwfn *p_hwfn, u8 num_specific_global_params) { struct dbg_tools_data *dev_data = &p_hwfn->dbg_info; - char sw_platform_str[MAX_SW_PLTAFORM_STR_SIZE]; u32 offset = 0; u8 num_params; @@ -1341,8 +1340,6 @@ static u32 qed_dump_common_global_params(struct qed_hwfn *p_hwfn, dump, "platform", s_hw_type_defs[dev_data->hw_type].name); - offset += qed_dump_str_param(dump_buf + offset, - dump, "sw-platform", sw_platform_str); offset += qed_dump_num_param(dump_buf + offset, dump, "pci-func", p_hwfn->abs_pf_id); offset += qed_dump_num_param(dump_buf + offset, |