From: Prarit Bhargava Date: Fri, 13 Sep 2013 12:33:34 +0000 (-0400) Subject: drm, ttm Fix uninitialized warning X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=bcf73a10837e9695f5ca7e3e65bf6ce850692d41;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git 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 Reviewed-by: Rob Clark Reviewed-by: David Herrmann Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ttm/ttm_object.c b/drivers/gpu/drm/ttm/ttm_object.c index 58a5f3261c0b..a868176c258a 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;