regmap: rbtree: Fixed node range check on sync
authorMaarten ter Huurne <maarten@treewalker.org>
Fri, 31 May 2013 14:45:13 +0000 (16:45 +0200)
committerMark Brown <broonie@linaro.org>
Sat, 1 Jun 2013 19:10:05 +0000 (20:10 +0100)
A node starting before the minimum register is no reason to reject it,
since its end could be in range. The check for the end already exists
two lines lower, so we can just remove the incorrect check.

Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regcache-rbtree.c

index b4e343b64c83f76285ed209ea4475f0faafc45ae..02f490bad30f791f627db78584ca75b691bc6eb7 100644 (file)
@@ -391,8 +391,6 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
        for (node = rb_first(&rbtree_ctx->root); node; node = rb_next(node)) {
                rbnode = rb_entry(node, struct regcache_rbtree_node, node);
 
-               if (rbnode->base_reg < min)
-                       continue;
                if (rbnode->base_reg > max)
                        break;
                if (rbnode->base_reg + rbnode->blklen < min)