Skip to content

Commit

Permalink
drm/rockchip: only call drm_fb_helper_hotplug_event if fb_helper present
Browse files Browse the repository at this point in the history
Add a check for the presence of fb_helper to rockchip_drm_output_poll_changed()
to only call drm_fb_helper_hotplug_event if there is actually a fb_helper
available. Without this check I see NULL pointer dereferences when the
hdmi hotplug irq fires before the fb_helper got initialized.

Signed-off-by: Heiko Stuebner <heiko@sntech.de>
  • Loading branch information
Heiko Stübner authored and Mark Yao committed Jul 13, 2015
1 parent 85a359f commit 765c35b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/rockchip/rockchip_drm_fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ static void rockchip_drm_output_poll_changed(struct drm_device *dev)
struct rockchip_drm_private *private = dev->dev_private;
struct drm_fb_helper *fb_helper = &private->fbdev_helper;

drm_fb_helper_hotplug_event(fb_helper);
if (fb_helper)
drm_fb_helper_hotplug_event(fb_helper);
}

static const struct drm_mode_config_funcs rockchip_drm_mode_config_funcs = {
Expand Down

0 comments on commit 765c35b

Please sign in to comment.