linux/drivers/mtd/ubi
Boris Brezillon 40b6e61ac7 ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()
Commit e96a8a3bb6 ("UBI: Fastmap: Do not add vol if it already
exists") introduced a bug by changing the possible error codes returned
by add_vol():
- this function no longer returns NULL in case of allocation failure
  but return ERR_PTR(-ENOMEM)
- when a duplicate entry in the volume RB tree is found it returns
  ERR_PTR(-EEXIST) instead of ERR_PTR(-EINVAL)

Fix the tests done on add_vol() return val to match this new behavior.

Fixes: e96a8a3bb6 ("UBI: Fastmap: Do not add vol if it already exists")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Sheng Yong <shengyong1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2016-10-28 14:48:18 +02:00
..
Kconfig
Makefile
attach.c UBI: introduce the VID buffer concept 2016-10-02 22:48:14 +02:00
block.c
build.c UBI: hide EBA internals 2016-10-02 22:48:14 +02:00
cdev.c UBI: add an helper to check lnum validity 2016-10-02 22:48:14 +02:00
debug.c
debug.h
eba.c UBI: Fix crash in try_recover_peb() 2016-10-20 00:06:06 +02:00
fastmap-wl.c ubi: Fix races around ubi_refill_pools() 2016-10-02 22:54:01 +02:00
fastmap.c ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() 2016-10-28 14:48:18 +02:00
gluebi.c
io.c UBI: introduce the VID buffer concept 2016-10-02 22:48:14 +02:00
kapi.c UBI: provide an helper to check whether a LEB is mapped or not 2016-10-02 22:48:14 +02:00
misc.c
ubi-media.h
ubi.h UBI: introduce the VID buffer concept 2016-10-02 22:48:14 +02:00
upd.c
vmt.c UBI: hide EBA internals 2016-10-02 22:48:14 +02:00
vtbl.c UBI: introduce the VID buffer concept 2016-10-02 22:48:14 +02:00
wl.c ubi: Fix races around ubi_refill_pools() 2016-10-02 22:54:01 +02:00
wl.h