summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>2013-07-23 15:45:11 +0200
committerBen Skeggs <bskeggs@redhat.com>2013-07-30 13:04:19 +1000
commit8a258353ed46fa9886bff42e869067336eeb1db6 (patch)
tree2457f5769f325747d6e7d244c987f0f86566d88b /drivers/gpu/drm/nouveau
parent8ff860564076f99aeb4f6d35dcb6ea008624e64e (diff)
downloadop-kernel-dev-8a258353ed46fa9886bff42e869067336eeb1db6.zip
op-kernel-dev-8a258353ed46fa9886bff42e869067336eeb1db6.tar.gz
drm/nouveau: fix null pointer dereference in poll_changed
Fixes vgaswitcheroo on a card without display. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_fbcon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
index 4c1bc06..8f6d63d 100644
--- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c
+++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c
@@ -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
OpenPOWER on IntegriCloud