android_kernel_samsung_univ.../drivers/mtd
Boris Brezillon 69e14ce883 ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap()
commit 40b6e61ac72e99672e47cdb99c8d7d226004169b upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 16:36:37 +01:00
..
chips
devices MTD updates for 4.4-rc1: 2015-11-06 11:50:24 -08:00
lpddr mtd: lpddr: show parent device in sysfs 2015-10-13 09:21:17 -07:00
maps mtd: pmcmsp-flash: Allocating too much in init_msp_flash() 2016-09-30 10:18:37 +02:00
nand mtd: nand: davinci: Reinitialize the HW ECC engine in 4bit hwctl 2016-10-07 15:23:40 +02:00
onenand mtd: onenand: fix deadlock in onenand_block_markbad 2016-04-12 09:09:05 -07:00
spi-nor mtd: spi-nor: remove micron_quad_enable() 2016-05-04 14:48:52 -07:00
tests mtd: tests: Replace timeval with ktime_t 2015-10-26 13:23:47 -07:00
ubi ubi: fastmap: Fix add_vol() return value test in ubi_attach_fastmap() 2016-11-10 16:36:37 +01:00
afs.c
ar7part.c
bcm47xxpart.c
bcm63xxpart.c
cmdlinepart.c mtd: cmdlinepart: convert printk() to pr_*() 2015-09-28 18:37:32 -07:00
ftl.c
inftlcore.c
inftlmount.c
Kconfig
Makefile
mtd_blkdevs.c mtd: blkdevs: fix potential deadlock + lockdep warnings 2015-10-30 17:24:43 -07:00
mtdblock_ro.c
mtdblock.c
mtdchar.c mtd: provide proper 32/64-bit compat_ioctl() support for BLKPG 2015-09-29 13:37:04 -07:00
mtdconcat.c
mtdcore.c mtd: fix cmdlinepart parser, early naming for auto-filled MTD 2016-01-04 10:54:18 -08:00
mtdcore.h
mtdoops.c
mtdpart.c mtd: mtdpart: Do not fail mtd probe when parsing partitions fails 2015-10-26 18:43:48 -07:00
mtdsuper.c
mtdswap.c
nftlcore.c
nftlmount.c
ofpart.c doc: dt: mtd: partitions: add compatible property to "partitions" node 2015-12-08 17:10:20 -08:00
redboot.c
rfd_ftl.c
sm_ftl.c
sm_ftl.h
ssfdc.c