Skip to content

Commit

Permalink
[media] atmel-isc: Fix the static checker warning
Browse files Browse the repository at this point in the history
Initialize the pointer 'fmt' before the start of
the loop.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Songjun Wu <songjun.wu@microchip.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
  • Loading branch information
Songjun Wu authored and Mauro Carvalho Chehab committed Apr 19, 2017
1 parent d72b196 commit 9eb9db3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/platform/atmel/atmel-isc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,7 @@ static int isc_formats_init(struct isc_device *isc)
}
}

fmt = &isc_formats[0];
for (i = 0, num_fmts = 0; i < ARRAY_SIZE(isc_formats); i++) {
if (fmt->isc_support || fmt->sd_support)
num_fmts++;
Expand Down

0 comments on commit 9eb9db3

Please sign in to comment.