Skip to content

Commit

Permalink
drm/nouveau: fix null pointer dereference in poll_changed
Browse files Browse the repository at this point in the history
Fixes vgaswitcheroo on a card without display.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Maarten Lankhorst authored and Ben Skeggs committed Jul 30, 2013
1 parent 8ff8605 commit 8a25835
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpu/drm/nouveau/nouveau_fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ void
nouveau_fbcon_output_poll_changed(struct drm_device *dev)
{
struct nouveau_drm *drm = nouveau_drm(dev);
drm_fb_helper_hotplug_event(&drm->fbcon->helper);
if (drm->fbcon)
drm_fb_helper_hotplug_event(&drm->fbcon->helper);
}

static int
Expand Down

0 comments on commit 8a25835

Please sign in to comment.