summaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorBrijesh Singh <brijesh.s.singh@gmail.com>2007-07-05 11:37:35 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-07-18 15:57:34 +0200
commit2f176f79877937082ce052977e552a75e23a73d1 (patch)
treec7f8eb96bac676fe06d77338e44a0da17810fce3 /drivers/mtd
parentUBI: fix bug in atomic_leb_change() (diff)
downloadlinux-2f176f79877937082ce052977e552a75e23a73d1.tar.xz
linux-2f176f79877937082ce052977e552a75e23a73d1.zip
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;