You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
445 B
13 lines
445 B
--- a/drivers/mtd/devices/ubi32-m25p80.c
|
|
+++ b/drivers/mtd/devices/ubi32-m25p80.c
|
|
@@ -630,8 +630,8 @@ static int ubicom32_flash_driver_erase(s
|
|
/* sanity checks */
|
|
if (instr->addr + instr->len > flash->mtd.size)
|
|
return -EINVAL;
|
|
- if ((instr->addr % mtd->erasesize) != 0
|
|
- || (instr->len % mtd->erasesize) != 0) {
|
|
+ if (((u32) instr->addr % mtd->erasesize) != 0
|
|
+ || ((u32) instr->len % mtd->erasesize) != 0) {
|
|
return -EINVAL;
|
|
}
|
|
|
|
|