]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
radeon_display: Use pointer return error codes
authorxueminsu <xuemin.su@intel.com>
Tue, 22 Jan 2013 14:16:53 +0000 (22:16 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Feb 2013 00:27:01 +0000 (18:27 -0600)
commit b2f4b03f8a378cd626d2ea67d19e7470c050a098 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/radeon/radeon_display.c

index 2bddddd7f2389579e63365ac8a752392f46418d1..64778497117e2182e55e1ea7e098e72fea1d3a9a 100644 (file)
@@ -1118,7 +1118,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;