diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2015-01-09 18:55:29 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2015-01-09 18:55:29 +0000 |
commit | f1c5831ca3e3eafb89331233221768b64db113e8 (patch) | |
tree | 4a43a89ad4cca46ee15d345448160cea14be8562 /hw | |
parent | 11fe680858653e32782b1c24f939e77427f285b4 (diff) | |
parent | a3a292c420d2fec3c07a7ca56fbb064cd57a298a (diff) | |
download | qemu-f1c5831ca3e3eafb89331233221768b64db113e8.zip qemu-f1c5831ca3e3eafb89331233221768b64db113e8.tar.gz qemu-f1c5831ca3e3eafb89331233221768b64db113e8.tar.bz2 |
Merge remote-tracking branch 'remotes/amit-virtio-rng/tags/rng-for-2.3' into staging
Fixes an init-time check for parameter validity
# gpg: Signature made Mon 05 Jan 2015 08:34:05 GMT using RSA key ID 854083B6
# gpg: Good signature from "Amit Shah <amit@amitshah.net>"
# gpg: aka "Amit Shah <amit@kernel.org>"
# gpg: aka "Amit Shah <amitshah@gmx.net>"
* remotes/amit-virtio-rng/tags/rng-for-2.3:
virtio-rng: fix check for period_ms validity
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/virtio/virtio-rng.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/virtio/virtio-rng.c b/hw/virtio/virtio-rng.c index 473c044..06e7178 100644 --- a/hw/virtio/virtio-rng.c +++ b/hw/virtio/virtio-rng.c @@ -149,7 +149,7 @@ static void virtio_rng_device_realize(DeviceState *dev, Error **errp) VirtIORNG *vrng = VIRTIO_RNG(dev); Error *local_err = NULL; - if (!vrng->conf.period_ms > 0) { + if (vrng->conf.period_ms <= 0) { error_setg(errp, "'period' parameter expects a positive integer"); return; } |