git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
nfsd4: cl_count is unused
[safe/jmp/linux-2.6]
/
fs
/
jffs2
/
scan.c
diff --git
a/fs/jffs2/scan.c
b/fs/jffs2/scan.c
index
8c1e692
..
696686c
100644
(file)
--- a/
fs/jffs2/scan.c
+++ b/
fs/jffs2/scan.c
@@
-97,11
+97,12
@@
int jffs2_scan_medium(struct jffs2_sb_info *c)
size_t pointlen;
if (c->mtd->point) {
size_t pointlen;
if (c->mtd->point) {
- ret = c->mtd->point (c->mtd, 0, c->mtd->size, &pointlen, &flashbuf);
+ ret = c->mtd->point(c->mtd, 0, c->mtd->size, &pointlen,
+ (void **)&flashbuf, NULL);
if (!ret && pointlen < c->mtd->size) {
/* Don't muck about if it won't let us point to the whole flash */
D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
if (!ret && pointlen < c->mtd->size) {
/* Don't muck about if it won't let us point to the whole flash */
D1(printk(KERN_DEBUG "MTD point returned len too short: 0x%zx\n", pointlen));
- c->mtd->unpoint(c->mtd,
flashbuf,
0, pointlen);
+ c->mtd->unpoint(c->mtd, 0, pointlen);
flashbuf = NULL;
}
if (ret)
flashbuf = NULL;
}
if (ret)
@@
-129,9
+130,9
@@
int jffs2_scan_medium(struct jffs2_sb_info *c)
if (jffs2_sum_active()) {
s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
if (!s) {
if (jffs2_sum_active()) {
s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
if (!s) {
- kfree(flashbuf);
JFFS2_WARNING("Can't allocate memory for summary\n");
JFFS2_WARNING("Can't allocate memory for summary\n");
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto out;
}
}
}
}
@@
-195,7
+196,7
@@
int jffs2_scan_medium(struct jffs2_sb_info *c)
if (c->nextblock) {
ret = file_dirty(c, c->nextblock);
if (ret)
if (c->nextblock) {
ret = file_dirty(c, c->nextblock);
if (ret)
-
return re
t;
+
goto ou
t;
/* deleting summary information of the old nextblock */
jffs2_sum_reset_collected(c->summary);
}
/* deleting summary information of the old nextblock */
jffs2_sum_reset_collected(c->summary);
}
@@
-206,7
+207,7
@@
int jffs2_scan_medium(struct jffs2_sb_info *c)
} else {
ret = file_dirty(c, jeb);
if (ret)
} else {
ret = file_dirty(c, jeb);
if (ret)
-
return re
t;
+
goto ou
t;
}
break;
}
break;
@@
-267,7
+268,7
@@
int jffs2_scan_medium(struct jffs2_sb_info *c)
kfree(flashbuf);
#ifndef __ECOS
else
kfree(flashbuf);
#ifndef __ECOS
else
- c->mtd->unpoint(c->mtd,
flashbuf,
0, c->mtd->size);
+ c->mtd->unpoint(c->mtd, 0, c->mtd->size);
#endif
if (s)
kfree(s);
#endif
if (s)
kfree(s);