diff options
author | liu chuansheng <chuansheng.liu@intel.com> | 2013-01-31 22:13:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-02-11 08:16:47 -0800 |
commit | aec2043d5287d064872491da54e89dc429cc9509 (patch) | |
tree | e0d40722092ba73dd84a43bb83ba450737f77b4d /drivers/gpu | |
parent | dfd365b9521a33e63210824d31838b9c8b258d4a (diff) | |
download | kernel_samsung_smdk4412-aec2043d5287d064872491da54e89dc429cc9509.zip kernel_samsung_smdk4412-aec2043d5287d064872491da54e89dc429cc9509.tar.gz kernel_samsung_smdk4412-aec2043d5287d064872491da54e89dc429cc9509.tar.bz2 |
drm/radeon: Calling object_unrefer() when creating fb failure
commit f2d68cf4daa4de97d400d94836b907e35228e54f upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_display.c | 4 |
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 ed085ce..0896fae 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1158,8 +1158,10 @@ radeon_user_framebuffer_create(struct drm_device *dev, } radeon_fb = kzalloc(sizeof(*radeon_fb), GFP_KERNEL); - if (radeon_fb == NULL) + if (radeon_fb == NULL) { + drm_gem_object_unreference_unlocked(obj); return ERR_PTR(-ENOMEM); + } radeon_framebuffer_init(dev, radeon_fb, mode_cmd, obj); |