drivers/isdn/capi: fix sparse warning: context imbalance
authorHannes Eder <hannes@hanneseder.net>
Wed, 25 Feb 2009 13:08:40 +0000 (13:08 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 27 Feb 2009 09:00:41 +0000 (01:00 -0800)
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 <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/capi/kcapi_proc.c

index c29208bd752131e9d8406c193a48f2a5982df272..50ed778f63fc84cd3c31da19a15b1f6bd60f5754 100644 (file)
@@ -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);
@@ -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);
 }