From: Brijesh Singh Date: Thu, 5 Jul 2007 09:37:35 +0000 (+0530) Subject: UBI: fix signed-unsigned multiplication X-Git-Tag: v2.6.23-rc1~495^2~8 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2f176f79877937082ce052977e552a75e23a73d1;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 20e297ad7f6..81008ab5d79 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;