netifd: Check device_claim return code in all cases
[project/netifd.git] / vlan.c
diff --git a/vlan.c b/vlan.c
index 28e561b..28b1441 100644 (file)
--- 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);