unlocking on return 1
Change-Id: I6bcef8e7af49360a100a058c9a9767285446fd70
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
*/
int check_task_on_filters(struct task_struct *task)
{
+ int ret = 0;
struct pf_group *pfg;
read_lock(&pfg_list_lock);
list_for_each_entry(pfg, &pfg_list, list) {
- if (check_task_f(&pfg->filter, task))
- return 1;
+ if (check_task_f(&pfg->filter, task)) {
+ ret = 1;
+ goto unlock;
+ }
}
- read_unlock(&pfg_list_lock);
+unlock:
+ read_unlock(&pfg_list_lock);
return 0;
}