diff options
author | Stefan Herbrechtsmeier | 2023-05-23 14:42:12 +0200 |
---|---|---|
committer | Michal Simek | 2023-06-12 13:25:01 +0200 |
commit | d0f1af3ec0135df848463c33a2cce9d40620a427 (patch) | |
tree | 1f0955c41275d0b99ae3d5f2ee40a74ad855eba2 | |
parent | bc75a3465f7a7ac98cd6115a113e79c952e68000 (diff) |
power: zynqmp: Mask node already configured error
Do not return an error (ENODEV) from the request function if the node is
already configured.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Link: https://lore.kernel.org/r/20230523124215.30915-3-stefan.herbrechtsmeier-oss@weidmueller.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
-rw-r--r-- | drivers/power/domain/zynqmp-power-domain.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/power/domain/zynqmp-power-domain.c b/drivers/power/domain/zynqmp-power-domain.c index adbbb5fdd93..5ee9e020fb3 100644 --- a/drivers/power/domain/zynqmp-power-domain.c +++ b/drivers/power/domain/zynqmp-power-domain.c @@ -23,12 +23,17 @@ static int zynqmp_pm_request_node(const u32 node, const u32 capabilities, static int zynqmp_power_domain_request(struct power_domain *power_domain) { + int ret = 0; + dev_dbg(power_domain->dev, "Request for id: %ld\n", power_domain->id); - if (IS_ENABLED(CONFIG_ARCH_ZYNQMP)) - return zynqmp_pmufw_node(power_domain->id); + if (IS_ENABLED(CONFIG_ARCH_ZYNQMP)) { + ret = zynqmp_pmufw_node(power_domain->id); + if (ret == -ENODEV) + ret = 0; + } - return 0; + return ret; } static int zynqmp_power_domain_free(struct power_domain *power_domain) |