projects
/
yaffs2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e72372f
)
Use IS_ERR to validate return value from get_mtd_device()
author
Kjetil Aamodt
<kjeaamod@cisco.com>
Mon, 9 Sep 2013 14:23:20 +0000
(16:23 +0200)
committer
Charles Manning
<cdhmanning@gmail.com>
Tue, 21 Jan 2014 23:28:01 +0000
(12:28 +1300)
Testing has shown that is needed.
yaffs_vfs_multi.c
patch
|
blob
|
history
diff --git
a/yaffs_vfs_multi.c
b/yaffs_vfs_multi.c
index 27cc0c010d73b7ce6d934ad948fe6dae66eef21a..f7673155348774a3120f911d5ca1d02ad75153a1 100644
(file)
--- 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));
/* 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));
yaffs_trace(YAFFS_TRACE_ALWAYS,
"yaffs: MTD device %u either not valid or unavailable",
MINOR(sb->s_dev));