UBI: add an helper to check lnum validity
authorBoris Brezillon <boris.brezillon@free-electrons.com>
Fri, 16 Sep 2016 14:59:22 +0000 (16:59 +0200)
committerRichard Weinberger <richard@nod.at>
Sun, 2 Oct 2016 20:48:14 +0000 (22:48 +0200)
commit9a5f09ac0ab83e4a965a24edd6cf7cb0303c6dc9
tree585c31efc8dc614a7bc705f73cfb8c69ae728913
parent2d78aee426d821bbecbc80ee96ada5730ee68b6f
UBI: add an helper to check lnum validity

ubi_leb_valid() is here to replace the
lnum < 0 || lnum >= vol->reserved_pebs checks.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
drivers/mtd/ubi/cdev.c
drivers/mtd/ubi/kapi.c
drivers/mtd/ubi/ubi.h