summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2016-05-27 09:44:46 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-05-27 12:30:27 +0200
commitda0647f2446e2485060957e9de9172b4b23834a3 (patch)
tree96975bbb65ac44e17a2c2c41c721c44756b764fb
parent14cd478b8376ddeeef513799c714dc4d2809f8d5 (diff)
downloadbarebox-da0647f2446e2485060957e9de9172b4b23834a3.tar.gz
barebox-da0647f2446e2485060957e9de9172b4b23834a3.tar.xz
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> Signed-off-by: Teresa Remmet <t.remmet@phytec.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mtd/ubi/fastmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/fastmap.c b/drivers/mtd/ubi/fastmap.c
index 1504911122..173da9c010 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/drivers/mtd/ubi/fastmap.c
@@ -714,7 +714,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;