summaryrefslogtreecommitdiffstats
path: root/drivers/of
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of')
-rw-r--r--drivers/of/unittest.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index 98cc0163301b..eb51bc147440 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -874,6 +874,9 @@ static void __init of_unittest_dma_get_max_cpu_address(void)
struct device_node *np;
phys_addr_t cpu_addr;
+ if (!IS_ENABLED(CONFIG_OF_ADDRESS))
+ return;
+
np = of_find_node_by_path("/testcase-data/address-tests");
if (!np) {
pr_err("missing testcase data\n");