Skip to content

Commit

Permalink
radeon_display: Use pointer return error codes
Browse files Browse the repository at this point in the history
drm_mode_addfb() expects fb_create return error code
instead of NULL.

Signed-off-by: xueminsu <xuemin.su@intel.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
  • Loading branch information
xueminsu authored and Alex Deucher committed Jan 23, 2013
1 parent e521a29 commit b2f4b03
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/radeon/radeon_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,7 +1122,7 @@ radeon_user_framebuffer_create(struct drm_device *dev,
if (ret) {
kfree(radeon_fb);
drm_gem_object_unreference_unlocked(obj);
return NULL;
return ERR_PTR(ret);
}

return &radeon_fb->base;
Expand Down

0 comments on commit b2f4b03

Please sign in to comment.