linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Kent Overstreet <kent.overstreet@gmail.com>, Jens Axboe <axboe@fb.com>
Cc: Shaohua Li <shli@kernel.org>,
	Eric Wheeler <git@linux.ewheeler.net>,
	Ming Lei <tom.leiming@gmail.com>, NeilBrown <neilb@suse.com>,
	Coly Li <colyli@suse.de>, Yijing Wang <wangyijing@huawei.com>,
	Jan Kara <jack@suse.cz>, Michal Hocko <mhocko@suse.com>,
	linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: [PATCH 1/2] bcache: silence static checker warning
Date: Wed, 28 Jun 2017 14:47:07 +0300	[thread overview]
Message-ID: <20170628114707.5oy4wmslmrethlzn@mwanda> (raw)

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>

diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c
index 8352fad765f6..78004c54f4f6 100644
--- a/drivers/md/bcache/super.c
+++ b/drivers/md/bcache/super.c
@@ -1374,9 +1374,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);

             reply	other threads:[~2017-06-28 11:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 11:47 Dan Carpenter [this message]
2017-06-28 11:48 ` [PATCH 2/2] bcache: Update continue_at() documentation Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170628114707.5oy4wmslmrethlzn@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=axboe@fb.com \
    --cc=colyli@suse.de \
    --cc=git@linux.ewheeler.net \
    --cc=jack@suse.cz \
    --cc=kent.overstreet@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=mhocko@suse.com \
    --cc=neilb@suse.com \
    --cc=shli@kernel.org \
    --cc=tom.leiming@gmail.com \
    --cc=wangyijing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).