瀏覽代碼

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>
Ben Skeggs 15 年之前
父節點
當前提交
b0a007dc27
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/gpu/drm/drm_fb_helper.c

+ 1 - 1
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) {