From: Songjun Wu Date: Mon, 17 Apr 2017 09:07:57 +0000 (-0300) Subject: [media] atmel-isc: Fix the static checker warning X-Git-Tag: v4.14-rc1~332^2~434 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eb9db3a0f92b75ec710066202e0b2accb45afa9;p=platform%2Fkernel%2Flinux-rpi.git [media] atmel-isc: Fix the static checker warning Initialize the pointer 'fmt' before the start of the loop. Reported-by: Dan Carpenter Signed-off-by: Songjun Wu Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index 7dacf8c..c4b2115 100644 --- a/drivers/media/platform/atmel/atmel-isc.c +++ b/drivers/media/platform/atmel/atmel-isc.c @@ -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++;