From: Jeff Garzik Date: Mon, 17 Jul 2006 16:54:40 +0000 (-0400) Subject: [NET] ethtool: fix oops by testing correct struct member X-Git-Tag: v2.6.18-rc3~78^2~4 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1b90c416d6e6b71fc63974c1798e3cf55bba77f;p=linux-2.6 [NET] ethtool: fix oops by testing correct struct member Noticed by Willy Tarreau. Signed-off-by: Jeff Garzik --- diff --git a/net/core/ethtool.c b/net/core/ethtool.c index 27ce1683ca..2797e28154 100644 --- a/net/core/ethtool.c +++ b/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)))