lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220418110716.2559453-1-chi.minghao@zte.com.cn>
Date:   Mon, 18 Apr 2022 11:07:16 +0000
From:   cgel.zte@...il.com
To:     tglx@...utronix.de
Cc:     linux-kernel@...r.kernel.org, Minghao Chi <chi.minghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: [PATCH] genirq: using pm_runtime_resume_and_get instead of pm_runtime_get_sync

From: Minghao Chi <chi.minghao@....com.cn>

Using pm_runtime_resume_and_get is more appropriate
for simplifing code

Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Minghao Chi <chi.minghao@....com.cn>
---
 kernel/irq/chip.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 54af0deb239b..8ddcb8e883d7 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1576,11 +1576,9 @@ int irq_chip_pm_get(struct irq_data *data)
 	int retval;
 
 	if (IS_ENABLED(CONFIG_PM) && dev) {
-		retval = pm_runtime_get_sync(dev);
-		if (retval < 0) {
-			pm_runtime_put_noidle(dev);
+		retval = pm_runtime_resume_and_get(dev);
+		if (retval < 0)
 			return retval;
-		}
 	}
 
 	return 0;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ