firmware loader: Add sparse annotation
authorBart Van Assche <bvanassche@acm.org>
Sat, 4 Jan 2014 13:20:36 +0000 (14:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Jan 2014 23:36:18 +0000 (15:36 -0800)
Avoid that sparse reports the following warning on __fw_free_buf():

drivers/base/firmware_class.c:230:9: warning: context imbalance in '__fw_free_buf' - unexpected unlock

Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Acked-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c

index 33b87bf..54592e6 100644 (file)
@@ -228,6 +228,7 @@ static int fw_lookup_and_allocate_buf(const char *fw_name,
 }
 
 static void __fw_free_buf(struct kref *ref)
+       __releases(&fwc->lock)
 {
        struct firmware_buf *buf = to_fwbuf(ref);
        struct firmware_cache *fwc = buf->fwc;