drm/virtio: fix uninitialized variable
smatch reported this with the blob series: drivers/gpu/drm/virtio/virtgpu_kms.c:227 virtio_gpu_init() error: uninitialized symbol 'ret'. Signed-off-by: Gurchetan Singh <gurchetansingh@chromium.org> Link: http://patchwork.freedesktop.org/patch/msgid/20200902210847.2689-3-gurchetansingh@chromium.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
e219688fc5
commit
1fb97413a3
|
@ -105,7 +105,7 @@ int virtio_gpu_init(struct drm_device *dev)
|
|||
/* this will expand later */
|
||||
struct virtqueue *vqs[2];
|
||||
u32 num_scanouts, num_capsets;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
|
||||
if (!virtio_has_feature(dev_to_virtio(dev->dev), VIRTIO_F_VERSION_1))
|
||||
return -ENODEV;
|
||||
|
|
Loading…
Reference in New Issue