summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/axmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/axmap.c b/lib/axmap.c
index e194e807..03e712f5 100644
--- a/lib/axmap.c
+++ b/lib/axmap.c
@@ -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;
}