From: hujianyang <hujianyang@huawei.com>
To: Artem Bityutskiy <dedekind1@gmail.com>
Cc: linux-mtd <linux-mtd@lists.infradead.org>
Subject: [PATCH 3/4] UBIFS: Add missing break in dbg_chk_pnode()
Date: Wed, 11 Jun 2014 10:41:17 +0800 [thread overview]
Message-ID: <5397C1CD.4070200@huawei.com> (raw)
In-Reply-To: <5397C0E7.9070602@huawei.com>
This is a minor fix. These two branches in dbg_chk_pnode
are dealing with different conditions. Although there is
no fault in current state, I think adding "break"s in
each end of branch is better.
Signed-off-by: hujianyang <hujianyang@huawei.com>
---
fs/ubifs/lpt.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index d46b19e..b4fb422 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -2198,6 +2198,7 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
lprops->dirty);
return -EINVAL;
}
+ break;
case LPROPS_FREEABLE:
case LPROPS_FRDI_IDX:
if (lprops->free + lprops->dirty != c->leb_size) {
@@ -2206,6 +2207,7 @@ static int dbg_chk_pnode(struct ubifs_info *c, struct ubifs_pnode *pnode,
lprops->dirty);
return -EINVAL;
}
+ break;
}
}
return 0;
--
1.8.1.4
next prev parent reply other threads:[~2014-06-11 2:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 2:37 [PATCH 0/4] UBIFS: Fix code issues detected by Fortify hujianyang
2014-06-11 2:38 ` [PATCH 1/4] UBIFS: Add missing error handling in create_default_filesystem() hujianyang
2014-06-11 2:40 ` [PATCH 2/4] UBIFS: Add missing error handling in dump_lpt_leb() hujianyang
2014-06-11 2:41 ` hujianyang [this message]
2014-06-11 2:42 ` [PATCH 4/4] UBIFS: Remove useless statements hujianyang
2014-07-01 12:37 ` Artem Bityutskiy
2014-07-07 8:07 ` hujianyang
2014-07-01 1:19 ` [PATCH 0/4] UBIFS: Fix code issues detected by Fortify hujianyang
2014-07-01 12:38 ` Artem Bityutskiy
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=5397C1CD.4070200@huawei.com \
--to=hujianyang@huawei.com \
--cc=dedekind1@gmail.com \
--cc=linux-mtd@lists.infradead.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.