drm/nouveau: Fix crashes during fbcon init on single head cards.

this fixes a regression since the fbcon rework.

Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Francisco Jerez 2010-07-10 17:37:00 +02:00 коммит произвёл Dave Airlie
Родитель 14d7ec11d1
Коммит 7173aeff02
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -387,7 +387,8 @@ int nouveau_fbcon_init(struct drm_device *dev)
dev_priv->nfbdev = nfbdev; dev_priv->nfbdev = nfbdev;
nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs; nfbdev->helper.funcs = &nouveau_fbcon_helper_funcs;
ret = drm_fb_helper_init(dev, &nfbdev->helper, 2, 4); ret = drm_fb_helper_init(dev, &nfbdev->helper,
nv_two_heads(dev) ? 2 : 1, 4);
if (ret) { if (ret) {
kfree(nfbdev); kfree(nfbdev);
return ret; return ret;