]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET] ethtool: fix oops by testing correct struct member
authorJeff Garzik <jeff@garzik.org>
Mon, 17 Jul 2006 16:54:40 +0000 (12:54 -0400)
committerJeff Garzik <jeff@garzik.org>
Mon, 17 Jul 2006 16:54:40 +0000 (12:54 -0400)
Noticed by Willy Tarreau.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
net/core/ethtool.c

index 27ce1683caf52bc69a31a8b4d4f3b34b6e9f8408..2797e2815418993515d39314fdaba8a9f6926b7f 100644 (file)
@@ -437,7 +437,7 @@ static int ethtool_set_pauseparam(struct net_device *dev, void __user *useraddr)
 {
        struct ethtool_pauseparam pauseparam;
 
-       if (!dev->ethtool_ops->get_pauseparam)
+       if (!dev->ethtool_ops->set_pauseparam)
                return -EOPNOTSUPP;
 
        if (copy_from_user(&pauseparam, useraddr, sizeof(pauseparam)))