summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_fbdev_generic.c
diff options
context:
space:
mode:
authorJavier Martinez Canillas <javierm@redhat.com>2023-01-21 20:24:17 +0100
committerJavier Martinez Canillas <javierm@redhat.com>2023-01-24 11:13:07 +0100
commitcc88ad784e42398b8845594fe3aa720d0cc1c40c (patch)
treedf5ed7bfac41336684a5185a7377b0cc87f648b4 /drivers/gpu/drm/drm_fbdev_generic.c
parent0220e4fe178c3390eb0291cdb34912d66972db8a (diff)
drm/fb-helper: Check fb_deferred_io_init() return value
The fb_deferred_io_init() can fail and return an errno code but currently there is no check for its return value. Fix that and propagate to errno to the caller in the case of a failure. Fixes: d536540f304c ("drm/fb-helper: Add generic fbdev emulation .fb_probe function") Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-3-javierm@redhat.com
Diffstat (limited to 'drivers/gpu/drm/drm_fbdev_generic.c')
-rw-r--r--drivers/gpu/drm/drm_fbdev_generic.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_fbdev_generic.c b/drivers/gpu/drm/drm_fbdev_generic.c
index ab8695669279..97e00f27d2d6 100644
--- a/drivers/gpu/drm/drm_fbdev_generic.c
+++ b/drivers/gpu/drm/drm_fbdev_generic.c
@@ -223,7 +223,9 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
fbi->fbdefio = &drm_fbdev_defio;
- fb_deferred_io_init(fbi);
+ ret = fb_deferred_io_init(fbi);
+ if (ret)
+ return ret;
} else {
/* buffer is mapped for HW framebuffer */
ret = drm_client_buffer_vmap(fb_helper->buffer, &map);