diff options
author | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 02:09:36 +0000 |
---|---|---|
committer | balrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-11-18 02:09:36 +0000 |
commit | 7317b8cad72b39bf06d1ce76e20a92c7ef157ba6 (patch) | |
tree | fb3fd13ec4b274803c77080411f03e46b0282d59 /hw/pflash_cfi01.c | |
parent | 9596ebb7012a19a45ca036a200acd617a93a321b (diff) |
Fix a && -> & typo.
Catch wrong/unknown NOR flash command sequences, by Thorsten Zitterell.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3684 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pflash_cfi01.c')
-rw-r--r-- | hw/pflash_cfi01.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/hw/pflash_cfi01.c b/hw/pflash_cfi01.c index 065dd2c80..f50d7bae7 100644 --- a/hw/pflash_cfi01.c +++ b/hw/pflash_cfi01.c @@ -353,6 +353,8 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, pfl->counter--; break; + default: + goto error_flash; } return; case 3: /* Confirm mode */ @@ -361,11 +363,14 @@ static void pflash_write (pflash_t *pfl, target_ulong offset, uint32_t value, if (cmd == 0xd0) { pfl->wcycle = 0; pfl->status |= 0x80; - break; } else { DPRINTF("%s: unknown command for \"write block\"\n", __func__); PFLASH_BUG("Write block confirm"); + goto reset_flash; } + break; + default: + goto error_flash; } return; default: |