[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 6/6] sm501: Fix warning about unreachable code
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 6/6] sm501: Fix warning about unreachable code |
Date: |
Mon, 16 Jul 2018 18:38:09 +1000 |
From: BALATON Zoltan <address@hidden>
Coverity warned that the false arm of conditional expression is
unreachable when it is inside an if with the same condition.
Remove the unreachable code to avoid the warning.
Fixes: CID 1394215
Reported-by: Paolo Bonzini <address@hidden>
Signed-off-by: BALATON Zoltan <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/display/sm501.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/display/sm501.c b/hw/display/sm501.c
index 9ab29d35dd..874260a143 100644
--- a/hw/display/sm501.c
+++ b/hw/display/sm501.c
@@ -1024,7 +1024,7 @@ static void sm501_i2c_write(void *opaque, hwaddr addr,
uint64_t value,
if (res) {
SM501_DPRINTF("sm501 i2c : transfer failed"
" i=%d, res=%d\n", i, res);
- s->i2c_status |= (res ? SM501_I2C_STATUS_ERROR :
0);
+ s->i2c_status |= SM501_I2C_STATUS_ERROR;
return;
}
}
--
2.17.1
- [Qemu-ppc] [PULL 0/6] ppc-for-3.0 queue 20180716, David Gibson, 2018/07/16
- [Qemu-ppc] [PULL 2/6] spapr: Correct inverted test in spapr_pc_dimm_node(), David Gibson, 2018/07/16
- [Qemu-ppc] [PULL 5/6] sam460ex: Correct use after free error, David Gibson, 2018/07/16
- [Qemu-ppc] [PULL 6/6] sm501: Fix warning about unreachable code,
David Gibson <=
- [Qemu-ppc] [PULL 1/6] sm501: Update screen on frame buffer address change, David Gibson, 2018/07/16
- [Qemu-ppc] [PULL 3/6] ppc/xics: fix ICP reset path, David Gibson, 2018/07/16
- [Qemu-ppc] [PULL 4/6] etsec: fix IRQ (un)masking, David Gibson, 2018/07/16
- Re: [Qemu-ppc] [PULL 0/6] ppc-for-3.0 queue 20180716, Peter Maydell, 2018/07/16