Commit 61c75816 authored by Bruce Allan's avatar Bruce Allan Committed by 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: default avatarBruce Allan <bruce.w.allan@intel.com>
Tested-by: default avatarEmil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment