Skip to content

Commit 7e5c0bb

Browse files
committed
PM: sleep: Fix bit masking operation
JIRA: https://issues.redhat.com/browse/RHEL-80696 commit 3860cbe Author: Colin Ian King <colin.i.king@gmail.com> Date: Wed Mar 19 11:43:24 2025 +0000 The mask operation link->flags | DL_FLAG_PM_RUNTIME is always true which is incorrect. The mask operation should be using the bit-wise & operator. Fix this. Fixes: bca84a7 ("PM: sleep: Use DPM_FLAG_SMART_SUSPEND conditionally") Signed-off-by: Colin Ian King <colin.i.king@gmail.com> Link: https://patch.msgid.link/20250319114324.791829-1-colin.i.king@gmail.com Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Mark Langsdorf <mlangsdo@redhat.com>
1 parent eef0368 commit 7e5c0bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/power/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1813,7 +1813,7 @@ static void device_prepare_smart_suspend(struct device *dev)
18131813
idx = device_links_read_lock();
18141814

18151815
list_for_each_entry_rcu_locked(link, &dev->links.suppliers, c_node) {
1816-
if (!(link->flags | DL_FLAG_PM_RUNTIME))
1816+
if (!(link->flags & DL_FLAG_PM_RUNTIME))
18171817
continue;
18181818

18191819
if (!dev_pm_smart_suspend(link->supplier) &&

0 commit comments

Comments
 (0)