Skip to content

Commit 3860cbe

Browse files
ColinIanKingrafaeljw
authored andcommitted
PM: sleep: Fix bit masking operation
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>
1 parent 03f1444 commit 3860cbe

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
@@ -1836,7 +1836,7 @@ static bool device_prepare_smart_suspend(struct device *dev)
18361836
idx = device_links_read_lock();
18371837

18381838
list_for_each_entry_rcu_locked(link, &dev->links.suppliers, c_node) {
1839-
if (!(link->flags | DL_FLAG_PM_RUNTIME))
1839+
if (!(link->flags & DL_FLAG_PM_RUNTIME))
18401840
continue;
18411841

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

0 commit comments

Comments
 (0)