summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorPatrick Caulfield <patrick@tykepenguin.com>2006-03-29 23:57:31 +0200
committerDavid S. Miller <davem@davemloft.net>2006-03-29 23:57:31 +0200
commit6a57b2ee4506bb8a3d2f7ba2f62ff65ec56ba150 (patch)
tree2e1f8d3b1f44aec97859175071c96659392f73dd /net/decnet
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-6a57b2ee4506bb8a3d2f7ba2f62ff65ec56ba150.tar.xz
linux-6a57b2ee4506bb8a3d2f7ba2f62ff65ec56ba150.zip
[DECNET]: Fix refcount
From: Patrick Caulfield <patrick@tykepenguin.com> 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 <davem@davemloft.net>
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index d2ae9893ca17..a26ff9f44576 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;
}