Skip to content

Commit

Permalink
drivers/isdn/capi: fix sparse warning: context imbalance
Browse files Browse the repository at this point in the history
Impact: Attribute functions with __acquires(...) resp. __releases(...).

Fix this sparse warnings:
  drivers/isdn/capi/kcapi_proc.c:241:13: warning: context imbalance in 'capi_driver_start' - wrong count at exit
  drivers/isdn/capi/kcapi_proc.c:252:13: warning: context imbalance in 'capi_driver_stop' - unexpected unlock

Signed-off-by: Hannes Eder <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
hanneseder-net authored and davem330 committed Feb 27, 2009
1 parent fe17f84 commit dfe925e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/isdn/capi/kcapi_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ static const struct file_operations proc_applstats_ops = {
// ---------------------------------------------------------------------------

static void *capi_driver_start(struct seq_file *seq, loff_t *pos)
__acquires(&capi_drivers_list_lock)
{
read_lock(&capi_drivers_list_lock);
return seq_list_start(&capi_drivers, *pos);
Expand All @@ -250,6 +251,7 @@ static void *capi_driver_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void capi_driver_stop(struct seq_file *seq, void *v)
__releases(&capi_drivers_list_lock)
{
read_unlock(&capi_drivers_list_lock);
}
Expand Down

0 comments on commit dfe925e

Please sign in to comment.