aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs
diff options
context:
space:
mode:
authorhujianyang <hujianyang@huawei.com>2014-05-21 05:19:45 -0400
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-05-27 08:05:23 -0400
commitdac3698147655aba4d71a8e67d6dd46d7a86154f (patch)
treee4594140725fa766ae05b90edd381bd36f0fc6c8 /fs/ubifs
parent604b592e6fd3c98f21435e1181ba7723ffc24715 (diff)
UBIFS: Fix dump messages in ubifs_dump_lprops
Function ubifs_read_one_lp will not set @lp and returns an error when ubifs_read_one_lp failed. We should not perform ubifs_dump_lprop in this case because @lp is not initialized as we wanted. Signed-off-by: hujianyang <hujianyang@huawei.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/debug.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c
index 5157b866a853..177b0152fef4 100644
--- a/fs/ubifs/debug.c
+++ b/fs/ubifs/debug.c
@@ -745,8 +745,10 @@ void ubifs_dump_lprops(struct ubifs_info *c)
745 745
746 for (lnum = c->main_first; lnum < c->leb_cnt; lnum++) { 746 for (lnum = c->main_first; lnum < c->leb_cnt; lnum++) {
747 err = ubifs_read_one_lp(c, lnum, &lp); 747 err = ubifs_read_one_lp(c, lnum, &lp);
748 if (err) 748 if (err) {
749 ubifs_err("cannot read lprops for LEB %d", lnum); 749 ubifs_err("cannot read lprops for LEB %d", lnum);
750 continue;
751 }
750 752
751 ubifs_dump_lprop(c, &lp); 753 ubifs_dump_lprop(c, &lp);
752 } 754 }