Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360374
b: refs/heads/master
c: c0cf787
h: refs/heads/master
v: v3
  • Loading branch information
Josh Wu authored and Artem Bityutskiy committed Feb 12, 2013
1 parent 11bb650 commit 7f53ac3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: f1a7c9d350339e8a81cda9469ba9a591fb9c9a3b
refs/heads/master: c0cf787f10c6ffb050e85c8ac9c0a8161cb06cb9
9 changes: 4 additions & 5 deletions trunk/drivers/mtd/nand/atmel_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -1215,7 +1215,7 @@ static void atmel_nand_hwctl(struct mtd_info *mtd, int mode)
static int atmel_of_init_port(struct atmel_nand_host *host,
struct device_node *np)
{
u32 val, table_offset;
u32 val;
u32 offset[2];
int ecc_mode;
struct atmel_nand_data *board = &host->board;
Expand Down Expand Up @@ -1288,13 +1288,12 @@ static int atmel_of_init_port(struct atmel_nand_host *host,
dev_err(host->dev, "Cannot get PMECC lookup table offset\n");
return -EINVAL;
}
table_offset = host->pmecc_sector_size == 512 ? offset[0] : offset[1];

if (!table_offset) {
if (!offset[0] && !offset[1]) {
dev_err(host->dev, "Invalid PMECC lookup table offset\n");
return -EINVAL;
}
host->pmecc_lookup_table_offset = table_offset;
host->pmecc_lookup_table_offset =
(host->pmecc_sector_size == 512) ? offset[0] : offset[1];

return 0;
}
Expand Down

0 comments on commit 7f53ac3

Please sign in to comment.