Received: by 10.213.65.68 with SMTP id h4csp815500imn; Sun, 25 Mar 2018 14:31:09 -0700 (PDT) X-Google-Smtp-Source: AG47ELtfuV85OtMmk2bEbuQAzlb89alP4jXGlsM15UIWCXvtde1kWZLWRz9Fz13ysPW8bO9Ku30K X-Received: by 10.99.111.6 with SMTP id k6mr26671535pgc.444.1522013469425; Sun, 25 Mar 2018 14:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522013469; cv=none; d=google.com; s=arc-20160816; b=HImmXT7jZEkchT6GlTnqZkP2hj8sBtXLsj/okst8gpE+8da7uF1sophvr8jIJCkwVv az8HQ2eb0YGvKztuB74lVnOrZvCKO9kmxqKelIUibgp2foO2oFEOxYx385io5Ihlbh0v IG6qQLwxS426zgUVwbx/0HV79sdq/TeiQLN27hFV+QOOQIeMmtZPNi86RvIjUZdqMmke PrLAk6PhXW45Te85VW5XRiUzjHrDMTDztsL2M7rq2bfWIwCqaChTnqJ/hjxz2VKrQaAt IElC11/e5C01NliTzTcOPTlHH1UIN8Fmp9M7Uwxj6/xIw/pgwh1ppSgeGnrWwuixxA4J aNVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:references:cc:to:subject:from:arc-authentication-results; bh=CWg8DDTwm2zTy+Ee+md4WtVZlaY9M7CaAw0dhgjWqhw=; b=iq9qUBHOi1xJswgQ+oNgW+dZGK4HtXsLfA+j4rChb89ENRcqePgxdHSfpEAUlHdm3e bAD42piuZ/rmg+4MfkiQamNSrcJQ6+2TIPV1cluV/zGfEDkhlZaapFnbtNhoe4M/xw17 VwUvvhNPY5PUgQExekSGQdUOLbEGJSeT0xhs+fmMo8wow09dCJZCxAHYGU+/xH7AQkqy JCM7tVIYATz/Kbn95dSEpFvzFzEDdv37X5xVp/m5U0P6bhLk/avsEhm2e0cH5GS9H9k3 0B8v+XsoMViSJi+N1AEWH3nmnpnzxSyBAPwkBRyKENARb7+ipTgwN/n0tQk2qESoI5Jo ofVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s13si308230pfs.91.2018.03.25.14.30.55; Sun, 25 Mar 2018 14:31:09 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752294AbeCYV12 (ORCPT + 99 others); Sun, 25 Mar 2018 17:27:28 -0400 Received: from vps-vb.mhejs.net ([37.28.154.113]:41268 "EHLO vps-vb.mhejs.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752237AbeCYV1W (ORCPT ); Sun, 25 Mar 2018 17:27:22 -0400 Received: by vps-vb.mhejs.net with esmtps (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.90_1) (envelope-from ) id 1f0DAe-0006O5-Qk; Sun, 25 Mar 2018 23:27:20 +0200 From: "Maciej S. Szmigiero" Subject: [PATCH v6 1/6] ivtv: zero-initialize cx25840 platform data To: Michael Krufky , Mauro Carvalho Chehab Cc: Andy Walls , linux-kernel , linux-media@vger.kernel.org, Hans Verkuil References: Message-ID: <254514e8-17a6-1e22-8095-9a7a6b992369@maciej.szmigiero.name> Date: Sun, 25 Mar 2018 23:27:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=iso-8859-2 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We need to zero-initialize cx25840 platform data structure to make sure that its future members do not contain random stack garbage. Signed-off-by: Maciej S. Szmigiero --- drivers/media/pci/ivtv/ivtv-i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/pci/ivtv/ivtv-i2c.c b/drivers/media/pci/ivtv/ivtv-i2c.c index 522cd111e399..e9ce54dd5e01 100644 --- a/drivers/media/pci/ivtv/ivtv-i2c.c +++ b/drivers/media/pci/ivtv/ivtv-i2c.c @@ -293,6 +293,7 @@ int ivtv_i2c_register(struct ivtv *itv, unsigned idx) .platform_data = &pdata, }; + memset(&pdata, 0, sizeof(pdata)); pdata.pvr150_workaround = itv->pvr150_workaround; sd = v4l2_i2c_new_subdev_board(&itv->v4l2_dev, adap, &cx25840_info, NULL);