Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

wcn36xx: fix iris child-node lookup

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent mmio node was also prematurely freed.

Fixes: fd52bdae9ab0 ("wcn36xx: Disable 5GHz for wcn3620")
Cc: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>

authored by

Johan Hovold and committed by
Kalle Valo
1967c128 307aeb31

+1 -1
+1 -1
drivers/net/wireless/ath/wcn36xx/main.c
··· 1233 1233 } 1234 1234 1235 1235 /* External RF module */ 1236 - iris_node = of_find_node_by_name(mmio_node, "iris"); 1236 + iris_node = of_get_child_by_name(mmio_node, "iris"); 1237 1237 if (iris_node) { 1238 1238 if (of_device_is_compatible(iris_node, "qcom,wcn3620")) 1239 1239 wcn->rf_id = RF_IRIS_WCN3620;