media: platform: exynos-gsc: remove redundant initializations of f_chk_len and f_chk_addr
authorColin Ian King <colin.i.king@gmail.com>
Wed, 18 May 2022 08:32:19 +0000 (09:32 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Mon, 20 Jun 2022 09:30:31 +0000 (10:30 +0100)
The variables f_chk_len and f_chk_addr are being initialized to zero and
then being re-assigned in the next statement. The initializations are
redundant and can be removed. Also initialize s_chk_addr and s_chk_len
at the declaration statement.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/samsung/exynos-gsc/gsc-core.c

index e3559b0..b147c64 100644 (file)
@@ -339,8 +339,7 @@ static int get_plane_info(struct gsc_frame *frm, u32 addr, u32 *index, u32 *ret_
 
 void gsc_set_prefbuf(struct gsc_dev *gsc, struct gsc_frame *frm)
 {
-       u32 f_chk_addr, f_chk_len, s_chk_addr, s_chk_len;
-       f_chk_addr = f_chk_len = s_chk_addr = s_chk_len = 0;
+       u32 f_chk_addr, f_chk_len, s_chk_addr = 0, s_chk_len = 0;
 
        f_chk_addr = frm->addr.y;
        f_chk_len = frm->payload[0];