From: Ben Skeggs Date: Tue, 8 Dec 2009 01:15:10 +0000 (+1000) Subject: drm/kms: fix fb cmap allocation to use modeset->crtc not crtc X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b0a007dc27d8d3ff3db07b3ea997323d9330f770;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/kms: fix fb cmap allocation to use modeset->crtc not crtc crtc may be undefined at this point. Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/drm_fb_helper.c index 515b838006d2..9a0aac0f7b79 100644 --- a/drivers/gpu/drm/drm_fb_helper.c +++ b/drivers/gpu/drm/drm_fb_helper.c @@ -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) {