diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 03:22:58 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-16 03:22:58 +0000 |
commit | e5e4452190fd42838db4b11912bd8cd03fa61e08 (patch) | |
tree | 374214b3170254d7666dd99241b14417b54983c2 /drivers/mfd | |
parent | Releasing progress-linux version 6.1.82-1progress7u1. (diff) | |
download | linux-e5e4452190fd42838db4b11912bd8cd03fa61e08.tar.xz linux-e5e4452190fd42838db4b11912bd8cd03fa61e08.zip |
Merging upstream version 6.1.85.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r-- | drivers/mfd/altera-sysmgr.c | 4 | ||||
-rw-r--r-- | drivers/mfd/syscon.c | 4 |
2 files changed, 6 insertions, 2 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); diff --git a/drivers/mfd/syscon.c b/drivers/mfd/syscon.c index 6196724ef..ecfe15122 100644 --- a/drivers/mfd/syscon.c +++ b/drivers/mfd/syscon.c @@ -223,7 +223,9 @@ struct regmap *syscon_regmap_lookup_by_phandle(struct device_node *np, return ERR_PTR(-ENODEV); regmap = syscon_node_to_regmap(syscon_np); - of_node_put(syscon_np); + + if (property) + of_node_put(syscon_np); return regmap; } |