All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/radeon/r600: Fix variables that are not used after assignment
@ 2021-04-08 12:13 Tian Tao
  2021-04-08 20:08 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Tian Tao @ 2021-04-08 12:13 UTC (permalink / raw)
  To: airlied, daniel, sumit.semwal; +Cc: Tian Tao, dri-devel

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/radeon/r600: Fix variables that are not used after assignment
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2021-04-08 20:08 UTC (permalink / raw)
  To: Tian Tao; +Cc: Dave Airlie, Maling list - DRI developers

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-08 20:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.