All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Tian Tao <tiantao6@hisilicon.com>
Cc: Dave Airlie <airlied@linux.ie>,
	Maling list - DRI developers <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/radeon/r600: Fix variables that are not used after assignment
Date: Thu, 8 Apr 2021 16:08:17 -0400	[thread overview]
Message-ID: <CADnq5_NVk1YvUwfNzN+XHwT2YSGpiOf3TdBynUt_vyoAr-bVqw@mail.gmail.com> (raw)
In-Reply-To: <1617884011-51265-1-git-send-email-tiantao6@hisilicon.com>

Applied.  Thanks!

Alex

On Thu, Apr 8, 2021 at 8:13 AM Tian Tao <tiantao6@hisilicon.com> wrote:
>
> err was not used after being assigned -EINVAL and was given a new value,
> so here add goto to handle the error case.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
>  drivers/gpu/drm/radeon/r600.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/radeon/r600.c b/drivers/gpu/drm/radeon/r600.c
> index b44e0c6..d516ad7 100644
> --- a/drivers/gpu/drm/radeon/r600.c
> +++ b/drivers/gpu/drm/radeon/r600.c
> @@ -2570,6 +2570,7 @@ int r600_init_microcode(struct radeon_device *rdev)
>                 pr_err("r600_cp: Bogus length %zu in firmware \"%s\"\n",
>                        rdev->me_fw->size, fw_name);
>                 err = -EINVAL;
> +               goto out;
>         }
>
>         snprintf(fw_name, sizeof(fw_name), "radeon/%s_rlc.bin", rlc_chip_name);
> @@ -2580,6 +2581,7 @@ int r600_init_microcode(struct radeon_device *rdev)
>                 pr_err("r600_rlc: Bogus length %zu in firmware \"%s\"\n",
>                        rdev->rlc_fw->size, fw_name);
>                 err = -EINVAL;
> +               goto out;
>         }
>
>         if ((rdev->family >= CHIP_RV770) && (rdev->family <= CHIP_HEMLOCK)) {
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2021-04-08 20:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08 12:13 [PATCH] drm/radeon/r600: Fix variables that are not used after assignment Tian Tao
2021-04-08 20:08 ` Alex Deucher [this message]

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_NVk1YvUwfNzN+XHwT2YSGpiOf3TdBynUt_vyoAr-bVqw@mail.gmail.com \
    --to=alexdeucher@gmail.com \
    --cc=airlied@linux.ie \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tiantao6@hisilicon.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 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.