Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f176f79 authored by Brijesh Singh's avatar Brijesh Singh Committed by Artem Bityutskiy
Browse files

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: default avatarBrijesh Singh <brijesh.s.singh@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 84a92580
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -298,7 +298,7 @@ static int do_sync_erase(const struct ubi_device *ubi, int pnum)
	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;