amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Nirmoy <nirmodas@amd.com>
To: "Colin King" <colin.king@canonical.com>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	"David Airlie" <airlied@linux.ie>,
	"Daniel Vetter" <daniel@ffwll.ch>,
	"Nirmoy Das" <nirmoy.das@amd.com>,
	"Sonny Jiang" <sonny.jiang@amd.com>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH][next] drm: amdgpu: fix premature goto because of missing braces
Date: Wed, 24 Jun 2020 16:33:30 +0200	[thread overview]
Message-ID: <f9ceecb4-2679-c0e2-8f64-4dd2a4f5401f@amd.com> (raw)
In-Reply-To: <20200624141423.6307-1-colin.king@canonical.com>

Acked-by: Nirmoy Das <nirmoy.das@amd.com>


Thanks,

Nirmoy

On 6/24/20 4:14 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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 <colin.king@canonical.com>
> ---
>   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) {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-06-24 14:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-24 14:14 [PATCH][next] drm: amdgpu: fix premature goto because of missing braces Colin King
2020-06-24 14:33 ` Nirmoy [this message]
2020-06-24 15:11   ` Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f9ceecb4-2679-c0e2-8f64-4dd2a4f5401f@amd.com \
    --to=nirmodas@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=colin.king@canonical.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nirmoy.das@amd.com \
    --cc=sonny.jiang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).