summaryrefslogtreecommitdiffhomepage
path: root/vlan.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2014-06-18 05:55:47 +0000
committerSteven Barth <steven@midlink.org>2014-06-18 13:01:32 +0200
commit5d655d1d3f6880b53ea5bafda159c02da038548f (patch)
tree290c189dd77e3c12bde58a278ccbc38444df474c /vlan.c
parent5e837916aa1ea128fa833f0803436c24f50cb5df (diff)
netifd: Check device_claim return code in all cases
Fixes observed issue a tunnel interface is reported as up although device_claim failed Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'vlan.c')
-rw-r--r--vlan.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/vlan.c b/vlan.c
index 28e561b..28b1441 100644
--- a/vlan.c
+++ b/vlan.c
@@ -50,7 +50,7 @@ static int vlan_set_device_state(struct device *dev, bool up)
}
ret = device_claim(&vldev->dep);
- if (ret)
+ if (ret < 0)
return ret;
system_vlan_add(vldev->dep.dev, vldev->id);