Commit 1dea6849 authored by Colin Ian King's avatar Colin Ian King Committed by Mauro Carvalho Chehab

media: zr364xx: remove redundant assigmnent to idx, clean up code

The variable cable_type is being initialized with a value that
is never read and is being re-assigned a little later on. Replace
the redundant initializtion with the assignment that occurs a little
later. Also initialize frm too rather than have a later assignment.

Addresses-Coverity: ("Unused value")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent 4edead77
...@@ -555,14 +555,12 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam, ...@@ -555,14 +555,12 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam,
{ {
unsigned char *pdest; unsigned char *pdest;
unsigned char *psrc; unsigned char *psrc;
s32 idx = -1; s32 idx = cam->cur_frame;
struct zr364xx_framei *frm; struct zr364xx_framei *frm = &cam->buffer.frame[idx];
int i = 0; int i = 0;
unsigned char *ptr = NULL; unsigned char *ptr = NULL;
_DBG("buffer to user\n"); _DBG("buffer to user\n");
idx = cam->cur_frame;
frm = &cam->buffer.frame[idx];
/* swap bytes if camera needs it */ /* swap bytes if camera needs it */
if (cam->method == METHOD0) { if (cam->method == METHOD0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment