Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6659f8fe authored by Laura Abbott's avatar Laura Abbott
Browse files

cma: use be32_to_cpup for devicetree conversion



The value returned by of_get_flat_dt_prop is a pointer. Use
be32_to_cpup which properly type checks against pointers.

Change-Id: Ie75ac6776bd26537a28729902bd918e710eda512
Signed-off-by: default avatarLaura Abbott <lauraa@codeaurora.org>
parent a6b9ac21
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -229,11 +229,11 @@ int __init cma_fdt_scan(unsigned long node, const char *uname,

	prop = of_get_flat_dt_prop(node, "#size-cells", NULL);
	if (prop)
		size_cells = be32_to_cpu(prop);
		size_cells = be32_to_cpup(prop);

	prop = of_get_flat_dt_prop(node, "#address-cells", NULL);
	if (prop)
		addr_cells = be32_to_cpu(prop);
		addr_cells = be32_to_cpup(prop);

	prop = of_get_flat_dt_prop(node, "reg", &len);
	if (!prop || depth != 2)