summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel
diff options
context:
space:
mode:
authorJosh Hay <joshua.a.hay@intel.com>2013-01-04 07:34:36 +0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-02-05 13:43:49 +0400
commitf752be9c3de4fbb6a9b2c060f3794bd928a0ad7a (patch)
tree2e4c62f9616136c83f11925b41973f46381e9c43 /drivers/net/ethernet/intel
parent07ce870bed2f631ad53a2c1a90db20b5f8126ab9 (diff)
downloadlinux-f752be9c3de4fbb6a9b2c060f3794bd928a0ad7a.tar.xz
ixgbe: fix potential null dereference
This patch adds a default case which goes to the next loop iteration in the case where p is not set, preventing p from being dereferenced. Signed-off-by: Josh Hay <joshua.a.hay@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
index 216203ece6ed..bafd141193af 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c
@@ -1040,6 +1040,9 @@ static void ixgbe_get_ethtool_stats(struct net_device *netdev,
p = (char *) adapter +
ixgbe_gstrings_stats[i].stat_offset;
break;
+ default:
+ data[i] = 0;
+ continue;
}
data[i] = (ixgbe_gstrings_stats[i].sizeof_stat ==