From mboxrd@z Thu Jan 1 00:00:00 1970 From: Colin King Date: Wed, 24 Jun 2020 14:14:23 +0000 Subject: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces Message-Id: <20200624141423.6307-1-colin.king@canonical.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , David Airlie , Daniel Vetter , Nirmoy Das , Sonny Jiang , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org From: Colin Ian King Currently the goto statement is skipping over a lot of setup code because it is outside of an if-block and should be inside it. Fix this by adding missing if statement braces. Addresses-Coverity: ("Structurally dead code") Fixes: fd151ca5396d ("drm amdgpu: SI UVD v3_1") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c index 599719e89c31..7cf4b11a65c5 100644 --- a/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c +++ b/drivers/gpu/drm/amd/amdgpu/uvd_v3_1.c @@ -642,9 +642,10 @@ static int uvd_v3_1_hw_init(void *handle) uvd_v3_1_start(adev); r = amdgpu_ring_test_helper(ring); - if (r) + if (r) { DRM_ERROR("amdgpu: UVD ring test fail (%d).\n", r); - goto done; + goto done; + } r = amdgpu_ring_alloc(ring, 10); if (r) { -- 2.27.0