[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 27ce168..2797e28 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)))