summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/misc.c')
-rw-r--r--drivers/mtd/ubi/misc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/misc.c b/drivers/mtd/ubi/misc.c
index 93e052812012..22ad31402945 100644
--- a/drivers/mtd/ubi/misc.c
+++ b/drivers/mtd/ubi/misc.c
@@ -37,7 +37,7 @@ int ubi_calc_data_len(const struct ubi_device *ubi, const void *buf,
{
int i;
- ubi_assert(length % ubi->min_io_size == 0);
+ ubi_assert(!(length & (ubi->min_io_size - 1)));
for (i = length - 1; i >= 0; i--)
if (((const uint8_t *)buf)[i] != 0xFF)