aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorliu chuansheng <chuansheng.liu@intel.com>2013-01-31 09:13:00 -0500
committerAlex Deucher <alexander.deucher@amd.com>2013-01-31 16:14:15 -0500
commitf2d68cf4daa4de97d400d94836b907e35228e54f (patch)
tree5d5dc7c590f77a51d9c878d233e189d98963ac46
parent39dc9aabd8708944031e6307819b2a794b841f83 (diff)
drm/radeon: Calling object_unrefer() when creating fb failure
When kzalloc() failed in radeon_user_framebuffer_create(), need to call object_unreference() to match the object_reference(). Signed-off-by: liu chuansheng <chuansheng.liu@intel.com> Signed-off-by: xueminsu <xuemin.su@intel.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
-rw-r--r--drivers/gpu/drm/radeon/radeon_display.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_display.c b/drivers/gpu/drm/radeon/radeon_display.c
index ff3def784619..05c96fa0b051 100644
--- a/drivers/gpu/drm/radeon/radeon_display.c
+++ b/drivers/gpu/drm/radeon/radeon_display.c
@@ -1115,8 +1115,10 @@ radeon_user_framebuffer_create(struct drm_device *dev,
1115 } 1115 }
1116 1116
1117 radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL); 1117 radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL);
1118 if (radeon_fb == NULL) 1118 if (radeon_fb == NULL) {
1119 drm_gem_object_unreference_unlocked(obj);
1119 return ERR_PTR(-ENOMEM); 1120 return ERR_PTR(-ENOMEM);
1121 }
1120 1122
1121 ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); 1123 ret = radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj);
1122 if (ret) { 1124 if (ret) {