axmap: return early of an overlap results in 0 settable bits
[fio.git] / lib / axmap.c
index e194e807ac542ee8068164e95f8977f7152b39cf..03e712f53be7a7623f90b12a3eecf57d73fc6f62 100644 (file)
@@ -241,6 +241,8 @@ static bool axmap_set_fn(struct axmap_level *al, unsigned long offset,
 
        if (overlap) {
                nr_bits = ffz(~overlap) - bit;
+               if (!nr_bits)
+                       return true;
                mask = bit_masks[nr_bits] << bit;
        }