From ab7789c5174cb12c9f9fb4f85efc6d18e7f04c2b Mon Sep 17 00:00:00 2001 From: Jules Irenge Date: Fri, 14 Feb 2020 20:47:30 +0000 Subject: 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 Link: https://lore.kernel.org/r/20200214204741.94112-20-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/base/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/base/core.c b/drivers/base/core.c index 922680af9051..ae6804da67b2 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -69,7 +69,7 @@ int device_links_read_lock(void) return srcu_read_lock(&device_links_srcu); } -void device_links_read_unlock(int idx) +void device_links_read_unlock(int idx) __releases(&device_links_srcu) { srcu_read_unlock(&device_links_srcu, idx); } -- cgit v1.2.3