]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: i2c: st-vgxy61: remove redundant initialization of pointer mode
authorColin Ian King <colin.i.king@gmail.com>
Mon, 5 Feb 2024 22:05:08 +0000 (22:05 +0000)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 16 Feb 2024 10:46:32 +0000 (11:46 +0100)
The pointer mode is being initialized with a value that is never
read, it is being re-assigned later on. The initialization is
redundant and can be removed.

Cleans up clang scan build warning:
drivers/media/i2c/st-vgxy61.c:632:33: warning: Value stored to 'mode'
during its initialization is never read [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Reviewed-by: Benjamin Mugnier <benjamin.mugnier@foss.st.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/i2c/st-vgxy61.c

index 2d64466d7ecfd9f28c93902041ba0a49d1a3c462..b9e7c57027b1b9d31d86f9df5c8b836b94ece6a4 100644 (file)
@@ -629,7 +629,7 @@ static int vgxy61_try_fmt_internal(struct v4l2_subdev *sd,
                                   const struct vgxy61_mode_info **new_mode)
 {
        struct vgxy61_dev *sensor = to_vgxy61_dev(sd);
-       const struct vgxy61_mode_info *mode = sensor->sensor_modes;
+       const struct vgxy61_mode_info *mode;
        unsigned int index;
 
        for (index = 0; index < ARRAY_SIZE(vgxy61_supported_codes); index++) {