2021-05-14 07:42:38

by Colin King

[permalink] [raw]
Subject: [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur

From: Colin Ian King <[email protected]>

The variable reg_cur is being initialized with a value that is never
read, it is being updated later on. The assignment is redundant and
can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <[email protected]>
---
drivers/staging/media/meson/vdec/vdec_helpers.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/meson/vdec/vdec_helpers.c b/drivers/staging/media/meson/vdec/vdec_helpers.c
index 7f07a9175815..b9125c295d1d 100644
--- a/drivers/staging/media/meson/vdec/vdec_helpers.c
+++ b/drivers/staging/media/meson/vdec/vdec_helpers.c
@@ -183,7 +183,7 @@ int amvdec_set_canvases(struct amvdec_session *sess,
u32 pixfmt = sess->pixfmt_cap;
u32 width = ALIGN(sess->width, 32);
u32 height = ALIGN(sess->height, 32);
- u32 reg_cur = reg_base[0];
+ u32 reg_cur;
u32 reg_num_cur = 0;
u32 reg_base_cur = 0;
int i = 0;
--
2.30.2



2021-05-16 17:25:58

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCH] media: meson: vdec: remove redundant initialization of variable reg_cur

On Fri, May 14, 2021 at 12:03 AM Colin King <[email protected]> wrote:
>
> From: Colin Ian King <[email protected]>
>
> The variable reg_cur is being initialized with a value that is never
> read, it is being updated later on. The assignment is redundant and
> can be removed.
>
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <[email protected]>
Acked-by: Martin Blumenstingl <[email protected]>