public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/virtgpu: Use ERR_PTR for fb_create callback error return
@ 2026-06-04  7:11 liuqiangneo
  2026-06-04 20:40 ` Claude review: " Claude Code Review Bot
  2026-06-04 20:40 ` Claude Code Review Bot
  0 siblings, 2 replies; 3+ messages in thread
From: liuqiangneo @ 2026-06-04  7:11 UTC (permalink / raw)
  To: airlied, kraxel, dmitry.osipenko
  Cc: gurchetansingh, olvaffe, maarten.lankhorst, mripard, tzimmermann,
	simona, dri-devel, virtualization, linux-kernel, Qiang Liu

From: Qiang Liu <liuqiang@kylinos.cn>

The fb_create callback returns an error code encoded with ERR_PTR()
on failure. This lets the caller see the actual error code instead of
just a generic failure.

Signed-off-by: Qiang Liu <liuqiang@kylinos.cn>
---
 drivers/gpu/drm/virtio/virtgpu_display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/virtio/virtgpu_display.c b/drivers/gpu/drm/virtio/virtgpu_display.c
index 44ffffec550f..85ea252c658e 100644
--- a/drivers/gpu/drm/virtio/virtgpu_display.c
+++ b/drivers/gpu/drm/virtio/virtgpu_display.c
@@ -344,7 +344,7 @@ virtio_gpu_user_framebuffer_create(struct drm_device *dev,
 	if (ret) {
 		kfree(virtio_gpu_fb);
 		drm_gem_object_put(obj);
-		return NULL;
+		return ERR_PTR(ret);
 	}
 
 	return &virtio_gpu_fb->base;
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-06-04 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04  7:11 [PATCH] drm/virtgpu: Use ERR_PTR for fb_create callback error return liuqiangneo
2026-06-04 20:40 ` Claude review: " Claude Code Review Bot
2026-06-04 20:40 ` Claude Code Review Bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox