diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mtd/ubi/upd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c index ddaa1a56cc69..6fa1ab3f2a70 100644 --- a/drivers/mtd/ubi/upd.c +++ b/drivers/mtd/ubi/upd.c | |||
@@ -237,10 +237,10 @@ static int write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, | |||
237 | int err; | 237 | int err; |
238 | 238 | ||
239 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) { | 239 | if (vol->vol_type == UBI_DYNAMIC_VOLUME) { |
240 | len = ALIGN(len, ubi->min_io_size); | 240 | int l = ALIGN(len, ubi->min_io_size); |
241 | memset(buf + len, 0xFF, len - len); | ||
242 | 241 | ||
243 | len = ubi_calc_data_len(ubi, buf, len); | 242 | memset(buf + len, 0xFF, l - len); |
243 | len = ubi_calc_data_len(ubi, buf, l); | ||
244 | if (len == 0) { | 244 | if (len == 0) { |
245 | dbg_msg("all %d bytes contain 0xFF - skip", len); | 245 | dbg_msg("all %d bytes contain 0xFF - skip", len); |
246 | return 0; | 246 | return 0; |