Skip to content

Commit ab7789c

Browse files
irengegregkh
authored andcommitted
driver core: Add missing annotation for device_links_read_lock()
Sparse reports a warning at device_links_read_unlock() warning: warning: context imbalance in device_links_read_unlock() - unexpected unlock The root cause is the missing annotation at device_links_read_unlock() Add the missing __releases(&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 dca0b44 commit ab7789c

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
@@ -69,7 +69,7 @@ int device_links_read_lock(void)
6969
return srcu_read_lock(&device_links_srcu);
7070
}
7171

72-
void device_links_read_unlock(int idx)
72+
void device_links_read_unlock(int idx) __releases(&device_links_srcu)
7373
{
7474
srcu_read_unlock(&device_links_srcu, idx);
7575
}

0 commit comments

Comments
 (0)