]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drm/nouveau: fix null pointer dereference in poll_changed
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 23 Jul 2013 13:45:11 +0000 (15:45 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 30 Jul 2013 03:04:19 +0000 (13:04 +1000)
Fixes vgaswitcheroo on a card without display.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_fbcon.c

index 4c1bc061fae2cab668f5d5f2bd24f1ab5febbc62..8f6d63d7edd314c4f6a6ff7e492c3b37be88930e 100644 (file)
@@ -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