2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-25 05:34:00 +08:00

drm/kms: fix fb cmap allocation to use modeset->crtc not crtc

crtc may be undefined at this point.

Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
Ben Skeggs 2009-12-08 11:15:10 +10:00 committed by Dave Airlie
parent 447aeb907e
commit b0a007dc27

View File

@ -908,7 +908,7 @@ int drm_fb_helper_single_fb_probe(struct drm_device *dev,
if (new_fb) {
info->var.pixclock = 0;
ret = fb_alloc_cmap(&info->cmap, crtc->gamma_size, 0);
ret = fb_alloc_cmap(&info->cmap, modeset->crtc->gamma_size, 0);
if (ret)
return ret;
if (register_framebuffer(info) < 0) {