Skip to content

Commit 68464d7

Browse files
irengegregkh
authored andcommitted
driver core: Add missing annotation for device_links_write_lock()
Sparse reports a warning at device_links_write_lock() warning: context imbalance in evice_links_write_lock() - wrong count at exit The root cause is the missing annotation at device_links_write_lock() Add the missing __acquires(&device_links_srcu) annotation Signed-off-by: Jules Irenge <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ab7789c commit 68464d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/base/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ static inline void device_links_write_unlock(void)
6464
mutex_unlock(&device_links_lock);
6565
}
6666

67-
int device_links_read_lock(void)
67+
int device_links_read_lock(void) __acquires(&device_links_srcu)
6868
{
6969
return srcu_read_lock(&device_links_srcu);
7070
}

0 commit comments

Comments
 (0)