提交 2f176f79 编写于 作者: B Brijesh Singh 提交者: Artem Bityutskiy

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: NBrijesh Singh <brijesh.s.singh@gmail.com>
Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 84a92580
......@@ -298,7 +298,7 @@ static int do_sync_erase(const struct ubi_device *ubi, int pnum)
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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册