From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH] ACPI: PM: Fix device wakeup power reference counting error
Date: Thu, 04 Nov 2021 18:21:51 +0100 [thread overview]
Message-ID: <2606454.mvXUDI8C0e@kreacher> (raw)
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Fix a device wakeup power reference counting error introduced by
commit a2d7b2e004af ("ACPI: PM: Fix sharing of wakeup power
resources").
Fixes: a2d7b2e004af ("ACPI: PM: Fix sharing of wakeup power resources")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/power.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
Index: linux-pm/drivers/acpi/power.c
===================================================================
--- linux-pm.orig/drivers/acpi/power.c
+++ linux-pm/drivers/acpi/power.c
@@ -757,10 +757,8 @@ int acpi_disable_wakeup_device_power(str
mutex_lock(&acpi_device_lock);
- if (dev->wakeup.prepare_count > 1) {
+ if (dev->wakeup.prepare_count >= 1)
dev->wakeup.prepare_count--;
- goto out;
- }
/* Do nothing if wakeup power has not been enabled for this device. */
if (!dev->wakeup.prepare_count)
next reply other threads:[~2021-11-04 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-04 17:21 Rafael J. Wysocki [this message]
2021-11-04 21:54 ` [PATCH] ACPI: PM: Fix device wakeup power reference counting error Rafael J. Wysocki
2021-11-05 14:39 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2606454.mvXUDI8C0e@kreacher \
--to=rjw@rjwysocki.net \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox