Skip to content

Commit

Permalink
drm/fb-helper: Check fb_deferred_io_init() return value
Browse files Browse the repository at this point in the history
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: d536540 ("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
  • Loading branch information
martinezjavier authored and riteshharjani committed Jan 31, 2023
1 parent 97d242f commit 24b2e11
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/drm_fbdev_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 24b2e11

Please sign in to comment.