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: d536540f ("drm/fb-helper: Add generic fbdev emulation .fb_probe function")
Signed-off-by: default avatarJavier Martinez Canillas <javierm@redhat.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20230121192418.2814955-3-javierm@redhat.com
parent 0220e4fe
...@@ -223,7 +223,9 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper, ...@@ -223,7 +223,9 @@ static int drm_fbdev_fb_probe(struct drm_fb_helper *fb_helper,
fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST; fbi->flags |= FBINFO_VIRTFB | FBINFO_READS_FAST;
fbi->fbdefio = &drm_fbdev_defio; fbi->fbdefio = &drm_fbdev_defio;
fb_deferred_io_init(fbi); ret = fb_deferred_io_init(fbi);
if (ret)
return ret;
} else { } else {
/* buffer is mapped for HW framebuffer */ /* buffer is mapped for HW framebuffer */
ret = drm_client_buffer_vmap(fb_helper->buffer, &map); ret = drm_client_buffer_vmap(fb_helper->buffer, &map);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment