Skip to content

Commit

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

Fix this sparse warnings:
  drivers/net/wireless/strip.c:955:21: warning: context imbalance in 'strip_seq_start' - wrong count at exit
  drivers/net/wireless/strip.c:975:13: warning: context imbalance in 'strip_seq_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Hannes Eder authored and David S. Miller committed Feb 18, 2009
1 parent 5ed1e98 commit b1ae1e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/strip.c
Original file line number Diff line number Diff line change
Expand Up @@ -950,6 +950,7 @@ static struct strip *strip_get_idx(loff_t pos)
}

static void *strip_seq_start(struct seq_file *seq, loff_t *pos)
__acquires(RCU)
{
rcu_read_lock();
return *pos ? strip_get_idx(*pos - 1) : SEQ_START_TOKEN;
Expand All @@ -973,6 +974,7 @@ static void *strip_seq_next(struct seq_file *seq, void *v, loff_t *pos)
}

static void strip_seq_stop(struct seq_file *seq, void *v)
__releases(RCU)
{
rcu_read_unlock();
}
Expand Down

0 comments on commit b1ae1e9

Please sign in to comment.