virtio/rng: Zero-initialize the device

Use calloc() to avoid uninitialized fields in the rng device.

Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
Link: https://lore.kernel.org/r/20220722141731.64039-5-jean-philippe@linaro.org
Signed-off-by: Will Deacon <will@kernel.org>
diff --git a/virtio/rng.c b/virtio/rng.c
index f9d607f..63ab8fc 100644
--- a/virtio/rng.c
+++ b/virtio/rng.c
@@ -162,7 +162,7 @@
 	if (!kvm->cfg.virtio_rng)
 		return 0;
 
-	rdev = malloc(sizeof(*rdev));
+	rdev = calloc(1, sizeof(*rdev));
 	if (rdev == NULL)
 		return -ENOMEM;