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>
This commit is contained in:
parent
84a9258062
commit
2f176f7987
1 changed files with 1 additions and 1 deletions
|
@ -298,7 +298,7 @@ retry:
|
||||||
memset(&ei, 0, sizeof(struct erase_info));
|
memset(&ei, 0, sizeof(struct erase_info));
|
||||||
|
|
||||||
ei.mtd = ubi->mtd;
|
ei.mtd = ubi->mtd;
|
||||||
ei.addr = pnum * ubi->peb_size;
|
ei.addr = (loff_t)pnum * ubi->peb_size;
|
||||||
ei.len = ubi->peb_size;
|
ei.len = ubi->peb_size;
|
||||||
ei.callback = erase_callback;
|
ei.callback = erase_callback;
|
||||||
ei.priv = (unsigned long)&wq;
|
ei.priv = (unsigned long)&wq;
|
||||||
|
|
Loading…
Reference in a new issue