diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index ae1718549eec..ec8336a4b7de 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5312,18 +5312,18 @@ intel_user_framebuffer_create(struct drm_device *dev, | |||
5312 | 5312 | ||
5313 | obj = drm_gem_object_lookup(dev, filp, mode_cmd->handle); | 5313 | obj = drm_gem_object_lookup(dev, filp, mode_cmd->handle); |
5314 | if (!obj) | 5314 | if (!obj) |
5315 | return NULL; | 5315 | return ERR_PTR(-ENOENT); |
5316 | 5316 | ||
5317 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); | 5317 | intel_fb = kzalloc(sizeof(*intel_fb), GFP_KERNEL); |
5318 | if (!intel_fb) | 5318 | if (!intel_fb) |
5319 | return NULL; | 5319 | return ERR_PTR(-ENOMEM); |
5320 | 5320 | ||
5321 | ret = intel_framebuffer_init(dev, intel_fb, | 5321 | ret = intel_framebuffer_init(dev, intel_fb, |
5322 | mode_cmd, obj); | 5322 | mode_cmd, obj); |
5323 | if (ret) { | 5323 | if (ret) { |
5324 | drm_gem_object_unreference_unlocked(obj); | 5324 | drm_gem_object_unreference_unlocked(obj); |
5325 | kfree(intel_fb); | 5325 | kfree(intel_fb); |
5326 | return NULL; | 5326 | return ERR_PTR(ret); |
5327 | } | 5327 | } |
5328 | 5328 | ||
5329 | return &intel_fb->base; | 5329 | return &intel_fb->base; |