radeon_display: Use pointer return error codes
authorxueminsu <xuemin.su@intel.com>
Tue, 22 Jan 2013 14:16:53 +0000 (22:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 23 Jan 2013 18:51:44 +0000 (13:51 -0500)
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
drivers/gpu/drm/radeon/radeon_display.c

index 1da2386..ff3def7 100644 (file)
@@ -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;