Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp621533ybt; Wed, 24 Jun 2020 07:19:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRZ82yJNxKhDYgRzdG1192WhmklDUxSG7cMZfH10HRMFvZGgdJnlizdKmio/gOd8094/vx X-Received: by 2002:a50:fd07:: with SMTP id i7mr9239150eds.221.1593008381860; Wed, 24 Jun 2020 07:19:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593008381; cv=none; d=google.com; s=arc-20160816; b=P1/Ds2LQemzIRZazkjMG3+alGd/PzMSYPS894Ghnplcmj5k+3H3eI91BDesj+J7cCA zVQALLbjqx0oKX7maXmOSlKMloYliFL4QAH8F0ab62bqmqbxyGRmEFUwKVdi5gW4BsRn /2NlSXf32ZyjjxufmrnfmmG3I4NuOT27334iYzJV6brJg+4w3KZUEH+d/mhAuTXeSYXg /7/dj3RF0PNB9Y+IrveIwYdlFI4rxnn83LmA+jvapxEi4YJBqWtsJtwerx1F313JOqMS 2X9joGgAA5hDDA13kwYJEoxozMPCm1QLER8xUjQYNVQOgiYrRSQQ7sgnWlpGQxixiqs0 rJyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=duZI6mXNjkBboe9WgavWIgD8pnPzb/OtYBuccmXlP6E=; b=HrjBcXTgfFhlC6vqG56YuGzMdMrEqs3FQf6Uf603ZT2Jp2dfsZL1iWtznsAqrFT3w9 hYUxCD6/RWvhohVXwSJh6sibsKFS1lVq1XtI6h7vDdHnB+RZwS39Ph9dC49SSYPuTUJ6 sP3g8zCw38PiF98exzsLU5/YmYUYgdbJCxl5CkO97KAPAFcGi85RfbISMkfyav5nQfeF x1HepzQVuJfOpYcFfvIXka+25WQ6sqoQJuk6540MZhYCo/mdzeYrgnWrnUav43ChPgQZ RHbSxXEvExuXiuGdryf3I4d+2W9ZqhOv7w9SJSO/LMLp5KQLM+NTHvDF0RW3sfnLO5vn hjUg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si12132966edn.474.2020.06.24.07.19.17; Wed, 24 Jun 2020 07:19:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391209AbgFXOP4 (ORCPT + 99 others); Wed, 24 Jun 2020 10:15:56 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:37404 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389682AbgFXOPz (ORCPT ); Wed, 24 Jun 2020 10:15:55 -0400 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1jo6AS-0003sS-48; Wed, 24 Jun 2020 14:14:24 +0000 From: Colin King 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 Subject: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces Date: Wed, 24 Jun 2020 15:14:23 +0100 Message-Id: <20200624141423.6307-1-colin.king@canonical.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: 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