From: Bruce Allan Date: Thu, 9 Dec 2010 23:04:25 +0000 (+0000) Subject: e1000e: static analysis tools complain of a possible null ptr p dereference X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=61c758166701c4f156c0aba10260f5729b1a6f43;p=linux-beck.git 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 Tested-by: Emil Tantilov Signed-off-by: Jeff Kirsher --- 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 ==