wireless: fix changing reconf/serialize options in configuration
[project/netifd.git] / bonding.c
index 0bf4f9a331efe3dfd8a0a5105667bf424b3e9eee..402c71cb7a89a62eeda5fdde0a59014eaabcf233 100644 (file)
--- a/bonding.c
+++ b/bonding.c
@@ -353,7 +353,7 @@ bonding_config_init(struct device *dev)
 {
        struct bonding_device *bdev;
        struct blob_attr *cur;
-       int rem;
+       size_t rem;
 
        bdev = container_of(dev, struct bonding_device, dev);
 
@@ -396,7 +396,7 @@ bonding_apply_settings(struct bonding_device *bdev, struct blob_attr **tb)
 
        if ((cur = tb[BOND_ATTR_POLICY]) != NULL) {
                const char *policy = blobmsg_get_string(cur);
-               int i;
+               size_t i;
 
                for (i = 0; i < ARRAY_SIZE(bonding_policy_str); i++) {
                        if (strcmp(policy, bonding_policy_str[i]) != 0)
@@ -566,8 +566,6 @@ bonding_free_port(struct bonding_port *bp)
 
        bonding_remove_port(bp);
 
-       device_lock();
-
        device_remove_user(&bp->dev);
 
        /*
@@ -582,8 +580,6 @@ bonding_free_port(struct bonding_port *bp)
                device_set_present(dev, true);
        }
 
-       device_unlock();
-
        free(bp);
 }