summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/fastmap.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2015-07-03 10:36:14 +0200
committerRichard Weinberger <richard@nod.at>2015-10-03 20:08:46 +0200
commit876f9a348779b348f44736254365bb574fea74eb (patch)
treef2eefbcf2fb59e62df3b12ef946408391c976349 /drivers/mtd/ubi/fastmap.c
parentUBIFS: fix a typo in comment of ubifs_budget_req (diff)
downloadlinux-876f9a348779b348f44736254365bb574fea74eb.tar.xz
linux-876f9a348779b348f44736254365bb574fea74eb.zip
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>
Diffstat (limited to 'drivers/mtd/ubi/fastmap.c')
-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 4aa2fd8633e7..0e6bfaf850f3 100644
--- a/drivers/mtd/ubi/fastmap.c
+++ b/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++) {
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;