Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
nand: k9f1g08: fail gracefully if no nand is present
Browse files Browse the repository at this point in the history
  • Loading branch information
sakoman committed Aug 26, 2010
1 parent 939d855 commit 7cbbe5b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/k9f1g08r0a.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,13 @@ int nand_chip()
(mfr == K9F1G08R0A_MFR && (id == K9F1G08R0A_ID))) {
return 0;
} else {
printf("Unknown chip: mfr was 0x%02x, id was 0x%02x\n", mfr, id);
return 1;
if ((mfr == 0) && (id == 0)) {
printf("No NAND detected\n");
return 0;
} else {
printf("Unknown chip: mfr was 0x%02x, id was 0x%02x\n", mfr, id);
return 1;
}
}
}

Expand Down

0 comments on commit 7cbbe5b

Please sign in to comment.