From: Kulikov Vasiliy <segooon@gmail.com>
To: kernel-janitors@vger.kernel.org
Cc: Artem Bityutskiy <dedekind1@gmail.com>,
Vasiliy Kulikov <segooon@gmail.com>,
linux-kernel@vger.kernel.org, Julia Lawall <julia@diku.dk>,
Tejun Heo <tj@kernel.org>,
linux-mtd@lists.infradead.org,
Adrian Hunter <adrian.hunter@nokia.com>
Subject: [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup
Date: Sun, 5 Sep 2010 22:33:00 +0400 [thread overview]
Message-ID: <1283711580-7546-1-git-send-email-segooon@gmail.com> (raw)
From: Vasiliy Kulikov <segooon@gmail.com>
Function ubifs_lpt_lookup may return ERR_PTR(...). Check for it.
Signed-off-by: Vasiliy Kulikov <segooon@gmail.com>
---
Compile tested.
fs/ubifs/lpt.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index 0084a33..841bb36 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1351,6 +1351,7 @@ static int read_lsave(struct ubifs_info *c)
{
int err, i;
void *buf;
+ struct ubifs_lprops *perr;
buf = vmalloc(c->lsave_sz);
if (!buf)
@@ -1370,7 +1371,11 @@ static int read_lsave(struct ubifs_info *c)
*/
if (lnum >= c->leb_cnt)
continue;
- ubifs_lpt_lookup(c, lnum);
+ perr = ubifs_lpt_lookup(c, lnum);
+ if (IS_ERR(perr)) {
+ err = PTR_ERR(perr);
+ goto out;
+ }
}
out:
vfree(buf);
--
1.7.0.4
next reply other threads:[~2010-09-05 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-05 18:33 Kulikov Vasiliy [this message]
2010-09-07 9:32 ` [PATCH 11/14] ubifs: check return code of ubifs_lpt_lookup 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=1283711580-7546-1-git-send-email-segooon@gmail.com \
--to=segooon@gmail.com \
--cc=adrian.hunter@nokia.com \
--cc=dedekind1@gmail.com \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mtd@lists.infradead.org \
--cc=tj@kernel.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 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).