From: Patrick Caulfield Date: Wed, 29 Mar 2006 21:57:31 +0000 (-0800) Subject: [DECNET]: Fix refcount X-Git-Tag: v2.6.17-rc1~26^2~5 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a57b2ee4506bb8a3d2f7ba2f62ff65ec56ba150;p=linux-2.6 [DECNET]: Fix refcount From: Patrick Caulfield This patch fixes a bug in the reference counting for the default DECnet device. If the device is changed, then the new device had its refcount decremented rather than the old one! Signed-off-by: David S. Miller --- diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index d2ae9893ca..a26ff9f445 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -620,7 +620,7 @@ int dn_dev_set_default(struct net_device *dev, int force) } write_unlock(&dndev_lock); if (old) - dev_put(dev); + dev_put(old); return rv; }