Browse Source

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>
Richard Weinberger 10 years ago
parent
commit
876f9a3487
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/mtd/ubi/fastmap.c

+ 1 - 1
drivers/mtd/ubi/fastmap.c

@@ -775,7 +775,7 @@ static int ubi_attach_fastmap(struct ubi_device *ubi,
 		for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) {
 		for (j = 0; j < be32_to_cpu(fm_eba->reserved_pebs); j++) {
 			int pnum = be32_to_cpu(fm_eba->pnum[j]);
 			int pnum = be32_to_cpu(fm_eba->pnum[j]);
 
 
-			if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0)
+			if (pnum < 0)
 				continue;
 				continue;
 
 
 			aeb = NULL;
 			aeb = NULL;