]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - net/core/ethtool.c
net: Zeroing the structure ethtool_wolinfo in ethtool_get_wol()
[mirror_ubuntu-zesty-kernel.git] / net / core / ethtool.c
index d92de0a1f0a49d51ec8329c65d46a4f2ae304ebd..c06c6acf78c58b2eb06f22093d40a2fd44145bfd 100644 (file)
@@ -1449,11 +1449,13 @@ static int ethtool_reset(struct net_device *dev, char __user *useraddr)
 
 static int ethtool_get_wol(struct net_device *dev, char __user *useraddr)
 {
-       struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
+       struct ethtool_wolinfo wol;
 
        if (!dev->ethtool_ops->get_wol)
                return -EOPNOTSUPP;
 
+       memset(&wol, 0, sizeof(struct ethtool_wolinfo));
+       wol.cmd = ETHTOOL_GWOL;
        dev->ethtool_ops->get_wol(dev, &wol);
 
        if (copy_to_user(useraddr, &wol, sizeof(wol)))