summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/altera-sysmgr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--drivers/mfd/altera-sysmgr.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mfd/altera-sysmgr.c b/drivers/mfd/altera-sysmgr.c
index 5d3715a28..dbe100994 100644
--- a/drivers/mfd/altera-sysmgr.c
+++ b/drivers/mfd/altera-sysmgr.c
@@ -110,7 +110,9 @@ struct regmap *altr_sysmgr_regmap_lookup_by_phandle(struct device_node *np,
dev = driver_find_device_by_of_node(&altr_sysmgr_driver.driver,
(void *)sysmgr_np);
- of_node_put(sysmgr_np);
+ if (property)
+ of_node_put(sysmgr_np);
+
if (!dev)
return ERR_PTR(-EPROBE_DEFER);