Skip to content

Commit

Permalink
UBI: fix signed-unsigned multiplication
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Brijesh Singh authored and Artem Bityutskiy committed Jul 18, 2007
1 parent 84a9258 commit 2f176f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mtd/ubi/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2f176f7

Please sign in to comment.