aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/memory.c2
-rw-r--r--drivers/base/regmap/regcache-rbtree.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/memory.c b/drivers/base/memory.c
index 2b7813ec6d02..ec386ee9cb22 100644
--- a/drivers/base/memory.c
+++ b/drivers/base/memory.c
@@ -141,6 +141,8 @@ static ssize_t show_mem_removable(struct device *dev,
141 container_of(dev, struct memory_block, dev); 141 container_of(dev, struct memory_block, dev);
142 142
143 for (i = 0; i < sections_per_block; i++) { 143 for (i = 0; i < sections_per_block; i++) {
144 if (!present_section_nr(mem->start_section_nr + i))
145 continue;
144 pfn = section_nr_to_pfn(mem->start_section_nr + i); 146 pfn = section_nr_to_pfn(mem->start_section_nr + i);
145 ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION); 147 ret &= is_mem_section_removable(pfn, PAGES_PER_SECTION);
146 } 148 }
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index e9a2261a383b..930cad4e5df8 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -354,7 +354,7 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
354 } 354 }
355 355
356 if (!rbnode->blklen) { 356 if (!rbnode->blklen) {
357 rbnode->blklen = sizeof(*rbnode); 357 rbnode->blklen = 1;
358 rbnode->base_reg = reg; 358 rbnode->base_reg = reg;
359 } 359 }
360 360