From: Thomas Hellstrom Date: Mon, 17 Oct 2011 11:27:34 +0000 (+0200) Subject: ttm: Fix error-path using an uninitialized value X-Git-Tag: v3.1~12^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e22469ca88a8f1f6fe47adbf5e5ce0906aec07cd;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git ttm: Fix error-path using an uninitialized value Pointed out by Michel Daenzer. Signed-off-by: Thomas Hellstrom Signed-off-by: Dave Airlie --- diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c index ae3c6f5..082fcae 100644 --- a/drivers/gpu/drm/ttm/ttm_bo_util.c +++ b/drivers/gpu/drm/ttm/ttm_bo_util.c @@ -321,7 +321,7 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo, struct ttm_mem_type_manager *man = &bdev->man[new_mem->mem_type]; struct ttm_tt *ttm = bo->ttm; struct ttm_mem_reg *old_mem = &bo->mem; - struct ttm_mem_reg old_copy; + struct ttm_mem_reg old_copy = *old_mem; void *old_iomap; void *new_iomap; int ret;