summaryrefslogtreecommitdiff
path: root/rust/helpers/build_bug.c
diff options
context:
space:
mode:
authorColin Ian King <colin.i.king@gmail.com>2024-11-07 18:23:57 +0300
committerRichard Weinberger <richard@nod.at>2024-11-14 21:54:27 +0300
commit67efb77cb0692ec40c416eae2dfbc70116e8ea4e (patch)
tree5ac538dade2b852c8b0c539c3f1a5e9f1f616ce1 /rust/helpers/build_bug.c
parent07593293ffabba14125c8998525adde5a832bfa3 (diff)
downloadlinux-67efb77cb0692ec40c416eae2dfbc70116e8ea4e.tar.xz
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>
Diffstat (limited to 'rust/helpers/build_bug.c')
0 files changed, 0 insertions, 0 deletions