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 <jbi.octave@gmail.com>
Link: https://lore.kernel.org/r/20200214204741.94112-20-jbi.octave@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Jules Irenge 2020-02-14 20:47:30 +00:00 committed by Greg Kroah-Hartman
parent dca0b44957
commit ab7789c517
1 changed files with 1 additions and 1 deletions

View File

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