[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>
This commit is contained in:
Patrick Caulfield 2006-03-29 13:57:31 -08:00 committed by David S. Miller
parent f3cab8a0b1
commit 6a57b2ee45

View file

@ -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;
}