From 7f7bdcaff5ad88a79257d6b28f95d0491b7f9002 Mon Sep 17 00:00:00 2001 From: Philippe Mathieu-Daudé Date: Sun, 5 May 2019 23:04:48 +0200 Subject: hw/block/pflash_cfi02: Simplify a statement using fall through Signed-off-by: Stephen Checkoway Message-Id: <20190426162624.55977-3-stephen.checkoway@oberlin.edu> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé [PMD: Extracted from bigger patch] Reviewed-by: Alistair Francis Signed-off-by: Philippe Mathieu-Daudé --- hw/block/pflash_cfi02.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'hw/block') diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c index e9eea0ec08..9e8c28af8f 100644 --- a/hw/block/pflash_cfi02.c +++ b/hw/block/pflash_cfi02.c @@ -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; } -- cgit v1.2.3-55-g7522