Skip to contentSkip to conversation

soc/fsl/qbman: Use index when accessing device tree properties

PATCH New Roy Pledge 1 participant 1 message Jun 27, 2019

Subsystems (2)
lore
Share & tools
lore

Roy Pledge

author
#0 lore raw

PATCH 1/1 soc/fsl/qbman: Use index when accessing device tree properties

The index value should be passed to the of_parse_phandle() function to ensure the correct property is read.

---
 drivers/soc/fsl/qbman/dpaa_sys.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/fsl/qbman/dpaa_sys.c +1 -1
index 3e0a7f3..0b901a8 100644
@@ -49,7 +49,7 @@ int qbman_init_private_mem(struct device *dev, int idx, dma_addr_t *addr,
 			idx, ret);
 		return -ENODEV;
 	}
-	mem_node = of_parse_phandle(dev->of_node, "memory-region", 0);
+	mem_node = of_parse_phandle(dev->of_node, "memory-region", idx);
 	if (mem_node) {
 		ret = of_property_read_u64(mem_node, "size", &size64);
 		if (ret) {
Signature · 1 line
2.7.4