Skip to content

Commit

Permalink
UBI: Fastmap: Simplify expression
Browse files Browse the repository at this point in the history
There is no need to compute pnum again.

Signed-off-by: Richard Weinberger <richard@nod.at>
Acked-by: Brian Norris <computersforpeace@gmail.com>
  • Loading branch information
Richard Weinberger committed Oct 3, 2015
1 parent 7d25b36 commit 876f9a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/fastmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
int pnum = be32_to_cpu(fm_eba->pnum[j]);

if ((int)be32_to_cpu(fm_eba->pnum[j]) < 0)
if (pnum < 0)
continue;

aeb = NULL;
Expand Down

0 comments on commit 876f9a3

Please sign in to comment.