linux/drivers/mtd/ubi
Colin Ian King 67efb77cb0 mtd: ubi: remove redundant check on bytes_left at end of function
In function ubi_nvmem_reg_read the while-loop can only be exiting
of bytes_left is zero or an error has occurred. There is an exit
return path if an error occurs, so the bytes_left can only be
zero after that point. Hence the check for a non-zero bytes_left
at the end of the function is redundant and can be removed. Remove
the check and just return 0.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2024-11-14 19:54:27 +01:00
..
attach.c ubi: fastmap: Fix duplicate slab cache names while attaching 2024-11-14 19:45:28 +01:00
block.c ubi: Fix ubi_init() ubiblock_exit() section mismatch 2024-07-28 20:08:25 +02:00
build.c mtd: ubi: Restore missing cleanup on ubi_init() failure path 2024-07-12 21:43:09 +02:00
cdev.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
debug.c [tree-wide] finally take no_llseek out 2024-09-27 08:18:43 -07:00
debug.h ubi: Add six fault injection type for testing 2024-01-06 23:41:40 +01:00
eba.c ubi: eba: properly rollback inside self_check_eba 2024-07-12 19:42:46 +02:00
fastmap-wl.c ubi: fastmap: wl: Schedule fm_work if wear-leveling pool is empty 2024-11-14 17:48:28 +01:00
fastmap.c ubi: correct the calculation of fastmap size 2024-02-25 21:30:15 +01:00
gluebi.c mtd: ubi: gluebi: Fix misnamed function parameter documentation 2020-11-20 12:37:32 +01:00
io.c ubi: Add six fault injection type for testing 2024-01-06 23:41:40 +01:00
kapi.c mtd: ubi: introduce pre-removal notification for UBI volumes 2024-02-25 22:41:33 +01:00
Kconfig mtd: ubi: provide NVMEM layer over UBI volumes 2024-02-25 22:42:23 +01:00
Makefile mtd: ubi: provide NVMEM layer over UBI volumes 2024-02-25 22:42:23 +01:00
misc.c ubi: use correct names in function kernel-doc comments 2023-02-05 22:36:39 +01:00
nvmem.c mtd: ubi: remove redundant check on bytes_left at end of function 2024-11-14 19:54:27 +01:00
ubi-media.h ubi: ubi-media.h: Fix comment typo 2022-09-21 11:12:18 +02:00
ubi.h ubi: wl: Close down wear-leveling before nand is suspended 2024-11-14 18:46:04 +01:00
upd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156 2019-05-30 11:26:35 -07:00
vmt.c mtd: ubi: fix unreleased fwnode_handle in find_volume_fwnode() 2024-11-14 19:52:14 +01:00
vtbl.c ubi: Check for too small LEB size in VTBL code 2024-02-25 21:19:42 +01:00
wl.c ubi: wl: Close down wear-leveling before nand is suspended 2024-11-14 18:46:04 +01:00
wl.h ubi: fastmap: wl: Schedule fm_work if wear-leveling pool is empty 2024-11-14 17:48:28 +01:00