mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
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>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user