From: Kjetil Aamodt Date: Mon, 9 Sep 2013 14:23:20 +0000 (+0200) Subject: Use IS_ERR to validate return value from get_mtd_device() X-Git-Tag: aleph1-release~44^2~1 X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=commitdiff_plain;h=e39f464748930c5de815c86df43704c6ba84fa0b Use IS_ERR to validate return value from get_mtd_device() Testing has shown that is needed. --- diff --git a/yaffs_vfs_multi.c b/yaffs_vfs_multi.c index 27cc0c0..f767315 100644 --- a/yaffs_vfs_multi.c +++ b/yaffs_vfs_multi.c @@ -2670,7 +2670,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, "yaffs: MTD device %u either not valid or unavailable", MINOR(sb->s_dev));