diff mbox series

[4.9,5/8] bcache: silence static checker warning

Message ID 20191122105253.11375-5-lee.jones@linaro.org
State Superseded
Headers show
Series [4.9,1/8] ARM: 8904/1: skip nomap memblocks while finding the lowmem/highmem boundary | expand

Commit Message

Lee Jones Nov. 22, 2019, 10:52 a.m. UTC
From: Dan Carpenter <dan.carpenter@oracle.com>


[ Upstream commit da22f0eea555baf9b0a84b52afe56db2052cfe8d ]

In olden times, closure_return() used to have a hidden return built in.
We removed the hidden return but forgot to add a new return here.  If
"c" were NULL we would oops on the next line, but fortunately "c" is
never NULL.  Let's just remove the if statement.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Reviewed-by: Coly Li <colyli@suse.de>

Signed-off-by: Jens Axboe <axboe@kernel.dk>

Signed-off-by: Lee Jones <lee.jones@linaro.org>

---
 drivers/md/bcache/super.c | 3 ---
 1 file changed, 3 deletions(-)

-- 
2.24.0

Comments

Sasha Levin Nov. 25, 2019, 1:47 p.m. UTC | #1
On Fri, Nov 22, 2019 at 10:52:50AM +0000, Lee Jones wrote:
>From: Dan Carpenter <dan.carpenter@oracle.com>

>

>[ Upstream commit da22f0eea555baf9b0a84b52afe56db2052cfe8d ]

>

>In olden times, closure_return() used to have a hidden return built in.

>We removed the hidden return but forgot to add a new return here.  If

>"c" were NULL we would oops on the next line, but fortunately "c" is

>never NULL.  Let's just remove the if statement.


So this doesn't actually fix anything?

-- 
Thanks,
Sasha
diff mbox series

Patch

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index c5bc3e5e921e..3e113be966fe 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1397,9 +1397,6 @@  static void cache_set_flush(struct closure *cl)
 	struct btree *b;
 	unsigned i;
 
-	if (!c)
-		closure_return(cl);
-
 	bch_cache_accounting_destroy(&c->accounting);
 
 	kobject_put(&c->internal);