mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-11 17:16:41 +07:00
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>
This commit is contained in:
parent
07ce870bed
commit
f752be9c3d
@ -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 ==
|
||||
|
Loading…
Reference in New Issue
Block a user