summaryrefslogtreecommitdiff
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.s.singh@gmail.com>2007-07-05 15:07:35 +0530
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 16:57:34 +0300
commit2f176f79877937082ce052977e552a75e23a73d1 (patch)
treec7f8eb96bac676fe06d77338e44a0da17810fce3 /drivers/mtd
parent84a925806210e002fab29966c09b9c92f382a79d (diff)
UBI: fix signed-unsigned multiplication
There is signed multiplication assigned to unsigned ei.addr in io.c. This causes wrong addresses for big multiplication.This patch solves the problem. Signed-off-by: Brijesh Singh <brijesh.s.singh@gmail.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/ubi/io.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index 20e297ad7f6b..81008ab5d793 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -298,7 +298,7 @@ retry:
memset(&ei, 0, sizeof(struct erase_info));
ei.mtd = ubi->mtd;
- ei.addr = pnum * ubi->peb_size;
+ ei.addr = (loff_t)pnum * ubi->peb_size;
ei.len = ubi->peb_size;
ei.callback = erase_callback;
ei.priv = (unsigned long)&wq;