diff options
author | Bruce Allan <bruce.w.allan@intel.com> | 2016-02-11 01:45:47 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-04-05 22:49:31 +0300 |
commit | c4114e3db6429c665adc3db871685c474a467efe (patch) | |
tree | e87e987b3a61b6908859dfa4ff7278ebfe6f6ac8 /drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | |
parent | d2e0721b18f320232dc36a0e4cc7beb620e8c9bd (diff) | |
download | linux-c4114e3db6429c665adc3db871685c474a467efe.tar.xz |
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: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c')
-rw-r--r-- | drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c index c67121cc7b23..2e4ea8861852 100644 --- a/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c +++ b/drivers/net/ethernet/intel/fm10k/fm10k_ethtool.c @@ -937,7 +937,7 @@ static int fm10k_mbx_test(struct fm10k_intfc *interface, u64 *data) struct fm10k_mbx_info *mbx = &hw->mbx; u32 attr_flag, test_msg[6]; unsigned long timeout; - int err; + int err = -EINVAL; /* For now this is a VF only feature */ if (hw->mac.type != fm10k_mac_vf) |