]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
driver core: Fix device_link_flag_is_sync_state_only()
authorSaravana Kannan <saravanak@google.com>
Fri, 2 Feb 2024 09:56:33 +0000 (01:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:51:22 +0000 (09:51 +0100)
commit4f37269d72f094256fbcfb707b22127bd90c626d
tree756bbea86e9fa5b99e9453878e41dbe560c46fab
parenta4b7741c8302e28073bfc6dd1c2e73598e5e535e
driver core: Fix device_link_flag_is_sync_state_only()

commit 7fddac12c38237252431d5b8af7b6d5771b6d125 upstream.

device_link_flag_is_sync_state_only() correctly returns true on the flags
of an existing device link that only implements sync_state() functionality.
However, it incorrectly and confusingly returns false if it's called with
DL_FLAG_SYNC_STATE_ONLY.

This bug doesn't manifest in any of the existing calls to this function,
but fix this confusing behavior to avoid future bugs.

Fixes: 67cad5c67019 ("driver core: fw_devlink: Add DL_FLAG_CYCLE support to device links")
Signed-off-by: Saravana Kannan <saravanak@google.com>
Tested-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240202095636.868578-2-saravanak@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/core.c