Skip to content

Commit ab7eeb7

Browse files
zijun-hurobherring
authored andcommitted
of: reserved-memory: Move an assignment to effective place in __reserved_mem_alloc_size()
The assignment '@base = 0' in __reserved_mem_alloc_size() is meaningless since @base was already initialized to 0. Move the assignment to effective and proper place. Signed-off-by: Zijun Hu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent 29091a5 commit ab7eeb7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/of/of_reserved_mem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,13 +436,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
436436
return -EINVAL;
437437
}
438438

439-
base = 0;
440-
441439
while (len > 0) {
442440
start = dt_mem_next_cell(dt_root_addr_cells, &prop);
443441
end = start + dt_mem_next_cell(dt_root_size_cells,
444442
&prop);
445443

444+
base = 0;
446445
ret = __reserved_mem_alloc_in_range(size, align,
447446
start, end, nomap, &base);
448447
if (ret == 0) {

0 commit comments

Comments
 (0)