summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ast
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2014-05-01 09:31:33 +1000
committerDave Airlie <airlied@redhat.com>2014-05-01 09:31:33 +1000
commit7e9ab4081e646fc317d0a87929a352f0e5082190 (patch)
treeb826ebc9a3aeadde007fe69a8b30754ca7d890bc /drivers/gpu/drm/ast
parent2c9b25c59796e9e5f01193d15dde501e9af59714 (diff)
parent10e6856983c21b76d03282b6da86709bdc23eb77 (diff)
downloadlinux-7e9ab4081e646fc317d0a87929a352f0e5082190.tar.bz2
Merge branch 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm into drm-next
bunch of coverity fixes all minor. * 'drm-coverity-fixes' of git://people.freedesktop.org/~danvet/drm: drm: Fix error handling in drm_master_create drm/i2c/tda998x: Fix signed overflow issue drm/bochs: Remove unecessary NULL check in gem_free drm/bochs: Remove unnecessary NULL check in bo_unref drm/udl: Initialize ret in udl_driver_load drm/via: Remove unecessary NULL check drm/ast: Remove unecessary NULL check in gem_free drm/ast: Remove unnecessary NULL check in bo_unref drm/cirrus: Remove unecessary NULL check in gem_free drm/cirrus: Remove unnecessary NULL check in bo_unref drm/mgag200: Remove unecessary NULL check in gem_free drm/mgag200: Remove unecessary NULL check in bo_unref
Diffstat (limited to 'drivers/gpu/drm/ast')
-rw-r--r--drivers/gpu/drm/ast/ast_main.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpu/drm/ast/ast_main.c b/drivers/gpu/drm/ast/ast_main.c
index 50535fd5a88d..01bf9e730acf 100644
--- a/drivers/gpu/drm/ast/ast_main.c
+++ b/drivers/gpu/drm/ast/ast_main.c
@@ -411,16 +411,13 @@ static void ast_bo_unref(struct ast_bo **bo)
tbo = &((*bo)->bo);
ttm_bo_unref(&tbo);
- if (tbo == NULL)
- *bo = NULL;
-
+ *bo = NULL;
}
+
void ast_gem_free_object(struct drm_gem_object *obj)
{
struct ast_bo *ast_bo = gem_to_ast_bo(obj);
- if (!ast_bo)
- return;
ast_bo_unref(&ast_bo);
}