Commit 6a57b2ee authored by Patrick Caulfield's avatar Patrick Caulfield Committed by David S. Miller
Browse files

[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: default avatarDavid S. Miller <davem@davemloft.net>
parent f3cab8a0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}