diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 15:57:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-02 15:57:26 -0800 |
commit | 574c3fdae3890e60f8bc59e8107686944ba1e446 (patch) | |
tree | 7c41ea5bff8ef69b0ba600b74980e590e3be17dd /drivers/mtd/ubi/build.c | |
parent | 56635f7e6197404d7363f8dcaa7a97abf57276fb (diff) | |
parent | f2863c54f30cccb50661697a6e4bdcd0ad0b0a6c (diff) |
Merge branch 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6
* 'linux-next' of git://git.infradead.org/~dedekind/ubi-2.6:
UBI: fix checkpatch.pl warnings
UBI: simplify PEB protection code
UBI: prepare for protection tree improvements
UBI: return -ENOMEM upon failing vmalloc
UBI: document UBI ioctls
UBI: handle write errors in WL worker
UBI: fix error path
UBI: some code re-structuring
UBI: fix deadlock
UBI: fix warnings when debugging is enabled
Diffstat (limited to 'drivers/mtd/ubi/build.c')
-rw-r--r-- | drivers/mtd/ubi/build.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c index c7630a22831..ba0bd3d5775 100644 --- a/drivers/mtd/ubi/build.c +++ b/drivers/mtd/ubi/build.c @@ -815,19 +815,20 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num, int vid_hdr_offset) if (err) goto out_free; + err = -ENOMEM; ubi->peb_buf1 = vmalloc(ubi->peb_size); if (!ubi->peb_buf1) goto out_free; ubi->peb_buf2 = vmalloc(ubi->peb_size); if (!ubi->peb_buf2) - goto out_free; + goto out_free; #ifdef CONFIG_MTD_UBI_DEBUG mutex_init(&ubi->dbg_buf_mutex); ubi->dbg_peb_buf = vmalloc(ubi->peb_size); if (!ubi->dbg_peb_buf) - goto out_free; + goto out_free; #endif err = attach_by_scanning(ubi); |