Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[deliverable/linux.git] / net / batman-adv / bat_iv_ogm.c
index 7f98a9d39883029e427d132f670373e78f0a982d..ce2f203048d35a606487e9cd3a9acec3d72d85f6 100644 (file)
@@ -157,10 +157,8 @@ static int batadv_iv_ogm_orig_add_if(struct batadv_orig_node *orig_node,
        orig_node->bat_iv.bcast_own = data_ptr;
 
        data_ptr = kmalloc_array(max_if_num, sizeof(u8), GFP_ATOMIC);
-       if (!data_ptr) {
-               kfree(orig_node->bat_iv.bcast_own);
+       if (!data_ptr)
                goto unlock;
-       }
 
        memcpy(data_ptr, orig_node->bat_iv.bcast_own_sum,
               (max_if_num - 1) * sizeof(u8));
@@ -1182,9 +1180,10 @@ static bool batadv_iv_ogm_calc_tq(struct batadv_orig_node *orig_node,
        u8 total_count;
        u8 orig_eq_count, neigh_rq_count, neigh_rq_inv, tq_own;
        unsigned int neigh_rq_inv_cube, neigh_rq_max_cube;
-       int tq_asym_penalty, inv_asym_penalty, if_num;
+       int if_num;
+       unsigned int tq_asym_penalty, inv_asym_penalty;
        unsigned int combined_tq;
-       int tq_iface_penalty;
+       unsigned int tq_iface_penalty;
        bool ret = false;
 
        /* find corresponding one hop neighbor */
This page took 0.026817 seconds and 5 git commands to generate.