From: Charles Manning Date: Tue, 21 Jan 2014 23:32:13 +0000 (+1300) Subject: Apply fixes in cisco patch to yaffs_vfs_single X-Git-Tag: aleph1-release~44^2 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=bc62199fe5f099e04e34857b346cfa89df5da1be Apply fixes in cisco patch to yaffs_vfs_single Cisco patched the multi version. This manually drags the fixes to the single version too. Signed-off-by: Charles Manning --- diff --git a/yaffs_vfs_single.c b/yaffs_vfs_single.c index 145517b..232dc26 100644 --- a/yaffs_vfs_single.c +++ b/yaffs_vfs_single.c @@ -2033,7 +2033,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, /* Get the device */ mtd = get_mtd_device(NULL, MINOR(sb->s_dev)); - if (!mtd) { + if (IS_ERR(mtd)) { yaffs_trace(YAFFS_TRACE_ALWAYS, "MTD device #%u doesn't appear to exist", MINOR(sb->s_dev)); @@ -2127,9 +2127,7 @@ static struct super_block *yaffs_internal_read_super(int yaffs_version, kfree(context); dev = NULL; context = NULL; - } - if (!dev) { /* Deep shit could not allocate device structure */ yaffs_trace(YAFFS_TRACE_ALWAYS, "yaffs_read_super failed trying to allocate yaffs_dev");