From patchwork Mon Jun 20 07:10:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: ubifs: dereferencing an ERR_PTR in ubifs_mount() Date: Sun, 19 Jun 2011 21:10:24 -0000 From: Dan Carpenter X-Patchwork-Id: 101040 Message-Id: <20110620071024.GF14591@shale.localdomain> To: Al Viro Cc: Adrian Hunter , linux-mtd@lists.infradead.org, dedekind1@gmail.com d251ed271d5 "ubifs: fix sget races" left out the goto from this error path so the static checkers complain that we're dereferencing "sb" when it's an ERR_PTR. Signed-off-by: Dan Carpenter diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 8c892c2..529be05 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -2146,6 +2146,7 @@ static struct dentry *ubifs_mount(struct file_system_type *fs_type, int flags, if (IS_ERR(sb)) { err = PTR_ERR(sb); kfree(c); + goto out_close; } if (sb->s_root) {