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>
This commit is contained in:
Maarten Lankhorst 2013-07-23 15:45:11 +02:00 коммит произвёл Ben Skeggs
Родитель 8ff8605640
Коммит 8a258353ed
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -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