diff options
author | Prarit Bhargava <prarit@redhat.com> | 2013-09-13 12:33:34 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2013-09-19 01:51:51 (GMT) |
commit | bcf73a10837e9695f5ca7e3e65bf6ce850692d41 (patch) | |
tree | c88a7612b70015aeebfe92f59be6b8fbc8074a35 | |
parent | 182b17c8dc4e83aab000ce86587b6810e515da87 (diff) | |
download | linux-bcf73a10837e9695f5ca7e3e65bf6ce850692d41.tar.xz |
drm, ttm Fix uninitialized warning
Fix uninitialized warning.
drivers/gpu/drm/ttm/ttm_object.c: In function ‘ttm_base_object_lookup’:
drivers/gpu/drm/ttm/ttm_object.c:213:10: error: ‘base’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
kref_put(&base->refcount, ttm_release_base);
^
drivers/gpu/drm/ttm/ttm_object.c:221:26: note: ‘base’ was declared here
struct ttm_base_object *base;
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
Reviewed-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_object.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c index 58a5f32..a868176 100644 --- a/drivers/gpu/drm/ttm/ttm_object.c +++ b/drivers/gpu/drm/ttm/ttm_object.c @@ -218,7 +218,7 @@ struct ttm_base_object *ttm_base_object_lookup(struct ttm_object_file *tfile, uint32_t key) { struct ttm_object_device *tdev = tfile->tdev; - struct ttm_base_object *base; + struct ttm_base_object *uninitialized_var(base); struct drm_hash_item *hash; int ret; |