[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1283711584-7587-1-git-send-email-segooon@gmail.com>
Date:	Sun,  5 Sep 2010 22:33:04 +0400
From:	Kulikov Vasiliy <segooon@...il.com>
To:	kernel-janitors@...r.kernel.org
Cc:	Vasiliy Kulikov <segooon@...il.com>,
	Artem Bityutskiy <dedekind1@...il.com>,
	Adrian Hunter <adrian.hunter@...ia.com>,
	Julia Lawall <julia@...u.dk>, Tejun Heo <tj@...nel.org>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: [PATCH 12/14] ubifs: check return code of pnode_lookup
From: Vasiliy Kulikov <segooon@...il.com>
Function pnode_lookup may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@...il.com>
---
 Compile tested.
 fs/ubifs/lpt_commit.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/fs/ubifs/lpt_commit.c b/fs/ubifs/lpt_commit.c
index d12535b..5c90dec 100644
--- a/fs/ubifs/lpt_commit.c
+++ b/fs/ubifs/lpt_commit.c
@@ -705,6 +705,9 @@ static int make_tree_dirty(struct ubifs_info *c)
 	struct ubifs_pnode *pnode;
 
 	pnode = pnode_lookup(c, 0);
+	if (IS_ERR(pnode))
+		return PTR_ERR(pnode);
+
 	while (pnode) {
 		do_make_pnode_dirty(c, pnode);
 		pnode = next_pnode_to_dirty(c, pnode);
-- 
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Powered by blists - more mailing lists
 
