diff options
author | liu chuansheng <chuansheng.liu@intel.com> | 2013-01-31 22:13:00 +0800 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2013-02-20 03:15:23 +0000 |
commit | e7a2a2e32bba0121dc1e4c2006fab092f30b4e0f (patch) | |
tree | 8912e43b6bce44c37c0c6fb9284e3340d5af331d /drivers/gpu | |
parent | 93322d7fee4bc923dfede42f78cad115027bfcd3 (diff) |
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: Ben Hutchings <ben@decadent.org.uk>
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 aec8e0c0485..63e714307c8 100644 --- a/drivers/gpu/drm/radeon/radeon_display.c +++ b/drivers/gpu/drm/radeon/radeon_display.c @@ -1110,8 +1110,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); |