diff options
author | Felix Fietkau <nbd@openwrt.org> | 2013-10-03 15:10:33 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2013-10-03 15:10:33 +0200 |
commit | 9c5fe49282cd15e81c8cf771aa271db10facc5b1 (patch) | |
tree | e47c391b4a16168abe5bfd6eb92774a76b4144d8 /device.c | |
parent | a4fd42af1acf5019ad8ad198bd466e030ef06bd5 (diff) | |
download | netifd-9c5fe49282cd15e81c8cf771aa271db10facc5b1.tar.gz |
device_add_user: return immediately if the new device is the same as the old device
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'device.c')
-rw-r--r-- | device.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -408,6 +408,9 @@ void device_add_user(struct device_user *dep, struct device *dev) { struct safe_list *head; + if (dep->dev == dev) + return; + if (dep->dev) device_remove_user(dep); |