Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

UBI: Fastmap: Simplify expression

There is no need to compute pnum again.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Brian Norris <computersforpeace@gmail.com>

+1 -1
+1 -1
drivers/mtd/ubi/fastmap.c
··· 775 775 for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) { 776 776 int pnum = be32_to_cpu(fm_eba->pnum[j]); 777 777 778 - if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0) 778 + if (pnum < 0) 779 779 continue; 780 780 781 781 aeb = NULL;