All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: "Christian König" <ckoenig.leichtzumerken@gmail.com>
Cc: Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] dma-buf: fix uninitialized variable usage in selftests
Date: Mon, 25 Oct 2021 11:59:06 -0400	[thread overview]
Message-ID: <CADnq5_NRCi1JFi53DMFJaAhqhPX-KTjf9ufQ3J+m6PgwyBgiig@mail.gmail.com> (raw)
In-Reply-To: <20211025072835.176805-1-christian.koenig@amd.com>

On Mon, Oct 25, 2021 at 3:28 AM Christian König
<ckoenig.leichtzumerken@gmail.com> wrote:
>
> "i" can be used uninitialized in one of the error branches. Fix this.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> Reported-by: kernel test robot <lkp@intel.com>

Acked-by: Alex Deucher <alexander.deucher@amd.com>

> ---
>  drivers/dma-buf/st-dma-resv.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma-buf/st-dma-resv.c b/drivers/dma-buf/st-dma-resv.c
> index 6f3ba756da3e..bc2265807f6c 100644
> --- a/drivers/dma-buf/st-dma-resv.c
> +++ b/drivers/dma-buf/st-dma-resv.c
> @@ -295,7 +295,7 @@ static int test_get_fences(void *arg, bool shared)
>                 if (r) {
>                         pr_err("Resv shared slot allocation failed\n");
>                         dma_resv_unlock(&resv);
> -                       goto err_free;
> +                       goto err_fini;
>                 }
>
>                 dma_resv_add_shared_fence(&resv, f);
> @@ -336,6 +336,7 @@ static int test_get_fences(void *arg, bool shared)
>         while (i--)
>                 dma_fence_put(fences[i]);
>         kfree(fences);
> +err_fini:
>         dma_resv_fini(&resv);
>         dma_fence_put(f);
>         return r;
> --
> 2.25.1
>

  reply	other threads:[~2021-10-25 15:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-25  7:28 [PATCH] dma-buf: fix uninitialized variable usage in selftests Christian König
2021-10-25 15:59 ` Alex Deucher [this message]
2021-10-25 22:48 ` Nathan Chancellor

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=CADnq5_NRCi1JFi53DMFJaAhqhPX-KTjf9ufQ3J+m6PgwyBgiig@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.