]> git.proxmox.com Git - mirror_qemu.git/commitdiff
hw/block/pflash_cfi02: Simplify a statement using fall through
authorPhilippe Mathieu-Daudé <philmd@redhat.com>
Sun, 5 May 2019 21:04:48 +0000 (23:04 +0200)
committerPhilippe Mathieu-Daudé <philmd@redhat.com>
Tue, 2 Jul 2019 00:31:13 +0000 (02:31 +0200)
Signed-off-by: Stephen Checkoway <stephen.checkoway@oberlin.edu>
Message-Id: <20190426162624.55977-3-stephen.checkoway@oberlin.edu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
[PMD: Extracted from bigger patch]
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
hw/block/pflash_cfi02.c

index e9eea0ec083321b8c510ad34daa3e7f3474d35ba..9e8c28af8f2cfba0cbcac128a1895c14f87cb9d7 100644 (file)
@@ -239,10 +239,10 @@ static uint32_t pflash_read(PFlashCFI02 *pfl, hwaddr offset,
         case 0x0E:
         case 0x0F:
             ret = boff & 0x01 ? pfl->ident3 : pfl->ident2;
-            if (ret == (uint8_t)-1) {
-                goto flash_read;
+            if (ret != (uint8_t)-1) {
+                break;
             }
-            break;
+            /* Fall through to data read. */
         default:
             goto flash_read;
         }