Commit ab7eeb7b authored by Zijun Hu's avatar Zijun Hu Committed by Rob Herring (Arm)
Browse files

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: default avatarZijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20250109-of_core_fix-v4-12-db8a72415b8c@quicinc.com


Signed-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent 29091a52
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -436,13 +436,12 @@ static int __init __reserved_mem_alloc_size(unsigned long node, const char *unam
			return -EINVAL;
		}

		base = 0;

		while (len > 0) {
			start = dt_mem_next_cell(dt_root_addr_cells, &prop);
			end = start + dt_mem_next_cell(dt_root_size_cells,
						       &prop);

			base = 0;
			ret = __reserved_mem_alloc_in_range(size, align,
					start, end, nomap, &base);
			if (ret == 0) {