From: Colin King <colin.king@canonical.com>
To: Jens Axboe <axboe@fb.com>, Ming Lei <tom.leiming@gmail.com>,
Hannes Reinecke <hare@suse.de>, Omar Sandoval <osandov@fb.com>,
Andrew Morton <akpm@linux-foundation.org>
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH][-next] loop: fix incorrect nesting levels on braces in nested if statements
Date: Fri, 9 Jun 2017 16:54:25 +0100 [thread overview]
Message-ID: <20170609155425.21260-1-colin.king@canonical.com> (raw)
From: Colin Ian King <colin.king@canonical.com>
Adding another set of braces clarifies the block and ensures that
both the setting of err and the error exit are executed on the
deepest nested if statement.
Detected by CoverityScan, CID#1440959 ("Nesting level does not
match indentation")
Fixes: f2c6df7dbf9a60 ("loop: support 4k physical blocksize")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/block/loop.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 4d376c10a97a..e288fb30100f 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -1147,10 +1147,11 @@ loop_set_status(struct loop_device *lo, const struct loop_info64 *info)
((lo->lo_flags & LO_FLAGS_BLOCKSIZE) &&
lo->lo_logical_blocksize != LO_INFO_BLOCKSIZE(info))) {
if (figure_loop_size(lo, info->lo_offset, info->lo_sizelimit,
- LO_INFO_BLOCKSIZE(info)))
+ LO_INFO_BLOCKSIZE(info))) {
err = -EFBIG;
goto exit;
}
+ }
loop_config_discard(lo);
--
2.11.0
next reply other threads:[~2017-06-09 15:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-09 15:54 Colin King [this message]
2017-06-09 15:57 ` Jens Axboe
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=20170609155425.21260-1-colin.king@canonical.com \
--to=colin.king@canonical.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@fb.com \
--cc=hare@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=osandov@fb.com \
--cc=tom.leiming@gmail.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
all inboxes | Powered by JetHome®