UBI: What's the correct assert condition in write_leb function in upd.c

Kyungmin Park kmpark at infradead.org
Wed Feb 14 03:28:47 EST 2007


Hi,

I think it's wrong assert condition in write_leb function in upd.c
What's the correct assert condition?

Thank you,
Kyungmin Park

diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c
index 1359ca4..09e394a 100644
--- a/drivers/mtd/ubi/upd.c
+++ b/drivers/mtd/ubi/upd.c
@@ -364,7 +364,7 @@ static int write_leb(const struct ubi_info *ubi, int
vol_id, int lnum,
 	if (vtr->vol_type == UBI_DYNAMIC_VOLUME) {
 		size_t l;
 
-		ubi_assert(len = vtr->usable_leb_size);
+		ubi_assert(len == vtr->usable_leb_size);
 
 		/* This is dynamic volume - skip the ending 0xFFs */
 		l = ubi_calc_data_len(ubi, buf, len);





More information about the linux-mtd mailing list