diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-07 13:47:00 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2016-07-07 13:47:00 +0100 |
commit | 5229f45bd98558af84d806a98032df3cb741c357 (patch) | |
tree | fbdcea867a0930926831f3cc2ecdc0755fcd15f8 /hw/misc/auxbus.c | |
parent | bb14a1eda0d060413d17466c58b39e4c0dbcde4e (diff) |
aux: fix break that wanted to break two levels out
The last "ret = AUX_I2C_NACK;" is dead, because it is always overridden
by AUX_I2C_ACK. What really the code wants is to jump out of the switch
statement, and a "return" will not cut it because it would omit a debug
printf.
Change the logic so that we can break out of the while loop. For clarity,
hoist the bus->last_* assignments up, right after i2c_start_transfer.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/auxbus.c')
0 files changed, 0 insertions, 0 deletions