]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
UBUNTU: SAUCE: Revert "UBUNTU: SAUCE: (no-up) net: Zeroing the structure ethtool_woli...
authorConnor Kuehl <connor.kuehl@canonical.com>
Mon, 11 Nov 2019 18:19:35 +0000 (10:19 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 12 Nov 2019 17:47:38 +0000 (18:47 +0100)
BugLink: https://bugs.launchpad.net/bugs/1852111
This reverts commit eccbe018a46b6fcb4fb2a403ddb73712754f8280 in favor of
the upstream stable variant.

Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
net/core/ethtool.c

index 563a48c3df361389818b3715cee26b05c300c941..6288e69e94fc5dacc3ffa7e47978d6098fbb0e69 100644 (file)
@@ -1395,13 +1395,11 @@ 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;
+       struct ethtool_wolinfo wol = { .cmd = ETHTOOL_GWOL };
 
        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)))