Commit c4114e3d authored by Bruce Allan's avatar Bruce Allan Committed by Jeff Kirsher

fm10k: prevent possibly uninitialized variable

If 'attr_flag < (1 << (2 * FM10K_TEST_MSG_NESTED))' is ever false, err
will be used uninitialized.
Signed-off-by: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarKrishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent d2e0721b
...@@ -937,7 +937,7 @@ static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data) ...@@ -937,7 +937,7 @@ static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data)
struct fm10k_mbx_info *mbx = &hw->mbx; struct fm10k_mbx_info *mbx = &hw->mbx;
u32 attr_flag, test_msg[6]; u32 attr_flag, test_msg[6];
unsigned long timeout; unsigned long timeout;
int err; int err = -EINVAL;
/* For now this is a VF only feature */ /* For now this is a VF only feature */
if (hw->mac.type != fm10k_mac_vf) if (hw->mac.type != fm10k_mac_vf)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment