Browse Source

[NET] ethtool: fix oops by testing correct struct member

Noticed by Willy Tarreau.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
Jeff Garzik 19 years ago
parent
commit
e1b90c416d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/core/ethtool.c

+ 1 - 1
net/core/ethtool.c

@@ -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)))