提交 61c75816 编写于 作者: B Bruce Allan 提交者: Jeff Kirsher

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: NBruce Allan <bruce.w.allan@intel.com>
Tested-by: NEmil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 e9262447
......@@ -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 ==
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册