Commit b0a007dc authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie

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

crtc may be undefined at this point.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 447aeb90
...@@ -908,7 +908,7 @@ int drm_fb_helper_single_fb_probe(struct drm_device *dev, ...@@ -908,7 +908,7 @@ int drm_fb_helper_single_fb_probe(struct drm_device *dev,
if (new_fb) { if (new_fb) {
info->var.pixclock = 0; 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) if (ret)
return ret; return ret;
if (register_framebuffer(info) < 0) { if (register_framebuffer(info) < 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment