The value is assigned later in this procedure.
Signed-off-by: Yuri Benditovich <yuri.benditovich@daynix.com>
Message-Id: <
20210315115937.14286-3-yuri.benditovich@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
{
VirtIOPCIProxy *proxy = opaque;
VirtIODevice *vdev = virtio_bus_get_device(&proxy->bus);
- uint64_t val = 0;
+ uint64_t val;
if (vdev == NULL) {
- return val;
+ return 0;
}
switch (size) {
case 4:
val = virtio_config_modern_readl(vdev, addr);
break;
+ default:
+ val = 0;
+ break;
}
return val;
}