aboutsummaryrefslogtreecommitdiff
path: root/hw/display
diff options
context:
space:
mode:
authorBALATON Zoltan <balaton@eik.bme.hu>2018-07-15 22:59:21 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2018-07-16 11:19:10 +1000
commit6730df0514d3aec35e646ff9833fbe8b05fd0776 (patch)
treebc4e9512feb90437e733ed21968597cd7e48bff6 /hw/display
parent3cc702d6aad603fdbe0c83db0bf803e450a6d0b8 (diff)
sm501: Fix warning about unreachable code
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 <pbonzini@redhat.com> Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/display')
-rw-r--r--hw/display/sm501.c2
1 files changed, 1 insertions, 1 deletions
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;
}
}