summaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000e
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2010-12-09 23:04:25 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2010-12-10 22:13:49 -0800
commit61c758166701c4f156c0aba10260f5729b1a6f43 (patch)
tree73ae69878b55a8f493b7d037a7edde819f9a2251 /drivers/net/e1000e
parente9262447233037e9336d5866628821156a17366f (diff)
downloadlinux-61c758166701c4f156c0aba10260f5729b1a6f43.tar.gz
linux-61c758166701c4f156c0aba10260f5729b1a6f43.tar.bz2
linux-61c758166701c4f156c0aba10260f5729b1a6f43.zip
e1000e: static analysis tools complain of a possible null ptr p dereference
Adding this default case resolves the issue. v2- Removed "break" in default case based on feedback Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Emil Tantilov <emil.s.tantilov@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/e1000e')
-rw-r--r--drivers/net/e1000e/ethtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c
index c10dc694d733..39349d6dcd0b 100644
--- a/drivers/net/e1000e/ethtool.c
+++ b/drivers/net/e1000e/ethtool.c
@@ -1978,6 +1978,9 @@ static void e1000_get_ethtool_stats(struct net_device *netdev,
p = (char *) adapter +
e1000_gstrings_stats[i].stat_offset;
break;
+ default:
+ data[i] = 0;
+ continue;
}
data[i] = (e1000_gstrings_stats[i].sizeof_stat ==