From patchwork Thu May 4 00:13:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gustavo A. R. Silva" X-Patchwork-Id: 9710667 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 70FEC60385 for ; Thu, 4 May 2017 00:35:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 62A2728667 for ; Thu, 4 May 2017 00:35:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 543C42867A; Thu, 4 May 2017 00:35:09 +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 E066628667 for ; Thu, 4 May 2017 00:35:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752612AbdEDAfB (ORCPT ); Wed, 3 May 2017 20:35:01 -0400 Received: from gateway31.websitewelcome.com ([192.185.143.234]:39039 "EHLO gateway31.websitewelcome.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752579AbdEDAe7 (ORCPT ); Wed, 3 May 2017 20:34:59 -0400 X-Greylist: delayed 1295 seconds by postgrey-1.27 at vger.kernel.org; Wed, 03 May 2017 20:34:59 EDT Received: from cm5.websitewelcome.com (cm5.websitewelcome.com [108.167.139.22]) by gateway31.websitewelcome.com (Postfix) with ESMTP id F12D511721 for ; Wed, 3 May 2017 19:13:21 -0500 (CDT) Received: from gator4166.hostgator.com ([108.167.133.22]) by cm5.websitewelcome.com with id G0DL1v0120V9LXg010DMDM; Wed, 03 May 2017 19:13:21 -0500 Received: from [177.237.170.200] (port=18178 helo=embeddedgus) by gator4166.hostgator.com with esmtpa (Exim 4.87) (envelope-from ) id 1d64OW-000W30-Mg; Wed, 03 May 2017 19:13:20 -0500 Date: Wed, 3 May 2017 19:13:18 -0500 From: "Gustavo A. R. Silva" To: "Lad, Prabhakar" , Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, "Gustavo A. R. Silva" Subject: [PATCH] media: i2c: initialize scalar variables Message-ID: <20170504001317.GA11538@embeddedgus> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - gator4166.hostgator.com X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - embeddedor.com X-BWhitelist: no X-Source-IP: 177.237.170.200 X-Exim-ID: 1d64OW-000W30-Mg X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: (embeddedgus) [177.237.170.200]:18178 X-Source-Auth: garsilva@embeddedor.com X-Email-Count: 3 X-Source-Cap: Z3V6aWRpbmU7Z3V6aWRpbmU7Z2F0b3I0MTY2Lmhvc3RnYXRvci5jb20= 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 scalar variables _pid_ and _ver_ to avoid a possible misbehavior. Addresses-Coverity-ID: 1324239 Addresses-Coverity-ID: 1324240 Signed-off-by: Gustavo A. R. Silva --- drivers/media/i2c/ov2659.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/media/i2c/ov2659.c b/drivers/media/i2c/ov2659.c index 6e63672..58615f8 100644 --- a/drivers/media/i2c/ov2659.c +++ b/drivers/media/i2c/ov2659.c @@ -1308,7 +1308,8 @@ static const struct v4l2_subdev_internal_ops ov2659_subdev_internal_ops = { static int ov2659_detect(struct v4l2_subdev *sd) { struct i2c_client *client = v4l2_get_subdevdata(sd); - u8 pid, ver; + u8 pid = 0; + u8 ver = 0; int ret; dev_dbg(&client->dev, "%s:\n", __func__);