[media] atmel-isc: Fix the static checker warning
authorSongjun Wu <songjun.wu@microchip.com>
Mon, 17 Apr 2017 09:07:57 +0000 (06:07 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 19 Apr 2017 12:02:47 +0000 (09:02 -0300)
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>
drivers/media/platform/atmel/atmel-isc.c

index 7dacf8c..c4b2115 100644 (file)
@@ -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++;