]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
power: zynqmp: Mask node already configured error
authorStefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>
Tue, 23 May 2023 12:42:12 +0000 (14:42 +0200)
committerMichal Simek <michal.simek@amd.com>
Mon, 12 Jun 2023 11:25:01 +0000 (13:25 +0200)
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>
drivers/power/domain/zynqmp-power-domain.c

index adbbb5fdd93f07780382e63d209db53c6b275f8e..5ee9e020fb3b658f5aeb2c7a2f4d1fe9b7a82353 100644 (file)
@@ -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)