block: fix returnvar.cocci warnings
authorJulia Lawall <julia.lawall@lip6.fr>
Tue, 26 May 2015 19:59:53 +0000 (21:59 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 26 May 2015 20:02:45 +0000 (14:02 -0600)
Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Jens Axboe <axboe@fb.com>
fs/buffer.c

index efd85e0e866006f83f831977a2aee6d4ae9ca674..f96173ad62d90413662e5ff15b14ed0df854ba5a 100644 (file)
@@ -2996,7 +2996,6 @@ void guard_bio_eod(int rw, struct bio *bio)
 int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
 {
        struct bio *bio;
-       int ret = 0;
 
        BUG_ON(!buffer_locked(bh));
        BUG_ON(!buffer_mapped(bh));
@@ -3038,7 +3037,7 @@ int _submit_bh(int rw, struct buffer_head *bh, unsigned long bio_flags)
                rw |= REQ_PRIO;
 
        submit_bio(rw, bio);
-       return ret;
+       return 0;
 }
 EXPORT_SYMBOL_GPL(_submit_bh);