From patchwork Mon Apr 17 09:07:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Songjun Wu X-Patchwork-Id: 9683675 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 63F4F602C2 for ; Mon, 17 Apr 2017 09:16:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E01627C05 for ; Mon, 17 Apr 2017 09:16:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 42EAF27F07; Mon, 17 Apr 2017 09:16:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0C32927C05 for ; Mon, 17 Apr 2017 09:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753521AbdDQJQA (ORCPT ); Mon, 17 Apr 2017 05:16:00 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:27463 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753266AbdDQJQA (ORCPT ); Mon, 17 Apr 2017 05:16:00 -0400 X-IronPort-AV: E=Sophos;i="5.37,214,1488870000"; d="scan'208";a="1578441" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/AES256-SHA; 17 Apr 2017 02:15:59 -0700 Received: from shaarm01.corp.atmel.com (10.10.76.4) by chn-sv-exch05.mchp-main.com (10.10.76.106) with Microsoft SMTP Server id 14.3.181.6; Mon, 17 Apr 2017 02:15:58 -0700 From: Songjun Wu To: Hans Verkuil , CC: , Songjun Wu , Mauro Carvalho Chehab , , Subject: [PATCH] [media] atmel-isc: Fix the static checker warning Date: Mon, 17 Apr 2017 17:07:57 +0800 Message-ID: <20170417090757.29199-1-songjun.wu@microchip.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Initialize the pointer 'fmt' before the start of the loop. Reported-by: Dan Carpenter Signed-off-by: Songjun Wu --- drivers/media/platform/atmel/atmel-isc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/atmel/atmel-isc.c b/drivers/media/platform/atmel/atmel-isc.c index 7dacf8c1354f..c4b2115559a5 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++;