diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 18:22:35 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-07 18:22:35 +0000 |
commit | 7442511ca141c67a20e85dec34b206cb413479d7 (patch) | |
tree | 855be4e1da2d19bb1024e61309885838cc9cd282 /hw/lm832x.c | |
parent | 856ae5c3324abb8fe6d905262e1cc9f4437e719f (diff) |
Don't try to return result from a void function (spotted by Sparse)
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7017 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/lm832x.c')
-rw-r--r-- | hw/lm832x.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/hw/lm832x.c b/hw/lm832x.c index dd94310f67..6479e1487c 100644 --- a/hw/lm832x.c +++ b/hw/lm832x.c @@ -519,8 +519,10 @@ void lm832x_key_event(struct i2c_slave *i2c, int key, int state) if ((s->status & INT_ERROR) && (s->error & ERR_FIFOOVR)) return; - if (s->kbd.len >= sizeof(s->kbd.fifo)) - return lm_kbd_error(s, ERR_FIFOOVR); + if (s->kbd.len >= sizeof(s->kbd.fifo)) { + lm_kbd_error(s, ERR_FIFOOVR); + return; + } s->kbd.fifo[(s->kbd.start + s->kbd.len ++) & (sizeof(s->kbd.fifo) - 1)] = key | (state << 7); |