diff options
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_fb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_fb.c b/drivers/gpu/drm/i915/intel_fb.c index afd1217b8a02..b7f0ebe9f810 100644 --- a/drivers/gpu/drm/i915/intel_fb.c +++ b/drivers/gpu/drm/i915/intel_fb.c | |||
@@ -473,7 +473,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
473 | ret = intel_framebuffer_create(dev, &mode_cmd, &fb, fbo); | 473 | ret = intel_framebuffer_create(dev, &mode_cmd, &fb, fbo); |
474 | if (ret) { | 474 | if (ret) { |
475 | DRM_ERROR("failed to allocate fb.\n"); | 475 | DRM_ERROR("failed to allocate fb.\n"); |
476 | goto out_unref; | 476 | goto out_unpin; |
477 | } | 477 | } |
478 | 478 | ||
479 | list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list); | 479 | list_add(&fb->filp_head, &dev->mode_config.fb_kernel_list); |
@@ -484,7 +484,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
484 | info = framebuffer_alloc(sizeof(struct intelfb_par), device); | 484 | info = framebuffer_alloc(sizeof(struct intelfb_par), device); |
485 | if (!info) { | 485 | if (!info) { |
486 | ret = -ENOMEM; | 486 | ret = -ENOMEM; |
487 | goto out_unref; | 487 | goto out_unpin; |
488 | } | 488 | } |
489 | 489 | ||
490 | par = info->par; | 490 | par = info->par; |
@@ -513,7 +513,7 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
513 | size); | 513 | size); |
514 | if (!info->screen_base) { | 514 | if (!info->screen_base) { |
515 | ret = -ENOSPC; | 515 | ret = -ENOSPC; |
516 | goto out_unref; | 516 | goto out_unpin; |
517 | } | 517 | } |
518 | info->screen_size = size; | 518 | info->screen_size = size; |
519 | 519 | ||
@@ -608,6 +608,8 @@ static int intelfb_create(struct drm_device *dev, uint32_t fb_width, | |||
608 | mutex_unlock(&dev->struct_mutex); | 608 | mutex_unlock(&dev->struct_mutex); |
609 | return 0; | 609 | return 0; |
610 | 610 | ||
611 | out_unpin: | ||
612 | i915_gem_object_unpin(fbo); | ||
611 | out_unref: | 613 | out_unref: |
612 | drm_gem_object_unreference(fbo); | 614 | drm_gem_object_unreference(fbo); |
613 | mutex_unlock(&dev->struct_mutex); | 615 | mutex_unlock(&dev->struct_mutex); |