Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213032
b: refs/heads/master
c: df3fca4
h: refs/heads/master
v: v3
  • Loading branch information
Artem Bityutskiy authored and Artem Bityutskiy committed Oct 21, 2010
1 parent 5c2521f commit 96bcffb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fb22b59b2c38054cc847f6acc5c46daa26dc6dd3
refs/heads/master: df3fca4cdddfa6e1f51b65214d4342660649bd1f
7 changes: 5 additions & 2 deletions trunk/drivers/mtd/ubi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ static int check_data_ff(struct ubi_device *ubi, struct ubi_vid_hdr *vid_hdr,
ubi_dbg_print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 32, 1,
ubi->peb_buf1, ubi->leb_size, 1);
mutex_unlock(&ubi->buf_mutex);
return -EINVAL;
return 1;
}

/**
Expand Down Expand Up @@ -936,7 +936,10 @@ static int process_eb(struct ubi_device *ubi, struct ubi_scan_info *si,
* have to check what is in the data area.
*/
err = check_data_ff(ubi, vidh, pnum);
if (!err)

if (err < 0)
return err;
else if (!err)
/* This corruption is caused by a power cut */
err = add_to_list(si, pnum, ec, 1, &si->erase);
else
Expand Down

0 comments on commit 96bcffb

Please sign in to comment.