From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: shechenglong <shechenglong@xfusion.com>,
airlied@redhat.com, kraxel@redhat.com,
gurchetansingh@chromium.org, olvaffe@gmail.com,
maarten.lankhorst@linux.intel.com
Cc: mripard@kernel.org, tzimmermann@suse.de, simona@ffwll.ch,
dri-devel@lists.freedesktop.org, virtualization@lists.linux.dev,
linux-kernel@vger.kernel.org, stone.xulei@xfusion.com,
chenjialong@xfusion.com
Subject: Re: [RESEND PATCH] drm/virtio: check return value of vgdev_output_init()
Date: Tue, 11 Aug 2026 18:33:08 +0300 [thread overview]
Message-ID: <dfec4abe-eee6-4f15-8410-4739ba5ef2de@collabora.com> (raw)
In-Reply-To: <20260811015624.830-1-shechenglong@xfusion.com>
On 8/11/26 04:56, shechenglong wrote:
> The return value of vgdev_output_init(), called by
> virtio_gpu_modeset_init(), is not checked. As a result, modeset
> initialization continues even if an output fails to initialize.
>
> check the return value and return the error to the caller.
>
> Signed-off-by: shechenglong <shechenglong@xfusion.com>
> ---
> drivers/gpu/drm/virtio/virtgpu_display.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
> index 44ffffec550f..f2b98d018c1e 100644
> --- a/drivers/gpu/drm/virtio/virtgpu_display.c
> +++ b/drivers/gpu/drm/virtio/virtgpu_display.c
> @@ -378,8 +378,11 @@ int virtio_gpu_modeset_init(struct virtio_gpu_device *vgdev)
>
> vgdev->ddev->mode_config.fb_modifiers_not_supported = true;
>
> - for (i = 0 ; i < vgdev->num_scanouts; ++i)
> - vgdev_output_init(vgdev, i);
> + for (i = 0; i < vgdev->num_scanouts; ++i) {
> + ret = vgdev_output_init(vgdev, i);
> + if (ret)
> + return ret;
> + }
>
> ret = drm_vblank_init(vgdev->ddev, vgdev->num_scanouts);
> if (ret)
> --
> 2.33.0
>
Reviewed-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
--
Best regards,
Dmitry
next prev parent reply other threads:[~2026-08-11 15:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 10:11 [PATCH] " shechenglong
2026-08-11 1:56 ` [RESEND PATCH] " shechenglong
2026-08-11 15:33 ` Dmitry Osipenko [this message]
2026-08-14 13:41 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=dfec4abe-eee6-4f15-8410-4739ba5ef2de@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=airlied@redhat.com \
--cc=chenjialong@xfusion.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=gurchetansingh@chromium.org \
--cc=kraxel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=olvaffe@gmail.com \
--cc=shechenglong@xfusion.com \
--cc=simona@ffwll.ch \
--cc=stone.xulei@xfusion.com \
--cc=tzimmermann@suse.de \
--cc=virtualization@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®