Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4621667pxf; Tue, 16 Mar 2021 19:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwObTuM9UUu0Z0ACqzr/AN1NEvyuET5MupjO/xqrLfhLEVY6MTQM3nlbqpucFa69o0LtyFv X-Received: by 2002:a50:ec81:: with SMTP id e1mr39111259edr.0.1615949216019; Tue, 16 Mar 2021 19:46:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1615949216; cv=none; d=google.com; s=arc-20160816; b=JQJtfqWq9CPbrItXNxfrzPneM5sdZQIxGf0JTNM3yEatQsRsAMNQIELA5LZOezv/ip scF0DVbbjJhsgwYqHTwTIlCFU0xLHF7temdDN+iE0QltGz1xYJEDIC7m6b6ZE33zie/L OjYSAyZRuuiuz3dysw3aruNacjVc9X+TpzmHBrWaKQCM/PIHjhE7J+g6awRyJhB6WNuQ DUZVzca+7jZiDymHvtIi1O/yCj6oFQE8aaPRmcq9fgJAaLbl1XdPM6bJ8JwrJK3pAk3o k+cI2X3hC28KgE+Dj1WEM29uG93BJupfws0GF7S2KGiSvuvcVqx+sKFCIBNo6yWJugLJ +sLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:ironport-sdr:ironport-sdr; bh=gOFiy3aeca6K8LZOVHAWBd5b/2Of/fUsSxdIhBG41fw=; b=kNpLihVq0f7+mG4VSsh/27QQvP2lCgY2Fxr+CgPWSwyxpkAvATPNYRoGuL+6BhsO2D bHEkK2n59XSHY3vROkL5aY3ca4tqpwphfh3yclimiwLaazXQ4Tp7338L8gNN2q8IC91m wMZdX46+qIs+6kybn4O4BQ6NTgH8iL5NnfugWY5K4OwVl3iPlsV/XSCo/nJlSbLf2Fym oEZmw3gXQ0iPMlbA8cU5TragNGGLM7o2mqzeHMzkss41/oM6RmXpZVos4dNmlnFjrlYS PLc+dGey4yXfm0cIbz9djUOLnMOGTJ0u8l9l3y+uEjZgdJLR14A8R/jmVb22KNxTNsq7 rppw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j19si15876349ejs.516.2021.03.16.19.46.33; Tue, 16 Mar 2021 19:46:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229492AbhCQCp2 (ORCPT + 99 others); Tue, 16 Mar 2021 22:45:28 -0400 Received: from mga14.intel.com ([192.55.52.115]:20620 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229566AbhCQCpZ (ORCPT ); Tue, 16 Mar 2021 22:45:25 -0400 IronPort-SDR: EDDmMSDU3WkOy7ez+Ni8Tv8WAfUnf91A79My/cafNG5GdflRgMgYKVYR8psrWY9PT3BjvqJBTK 2hKfuCHYOTPA== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="188735433" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="188735433" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 19:45:24 -0700 IronPort-SDR: 4u2ph9zUDgiEGtaVTuju/to6DuQa0lqUdVMnpjwQHF1RyIFgT/HCvTtD7/BZF9tn3UPPIKVBnZ 5HS6F4XhJHkQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="372185257" Received: from linux.intel.com ([10.54.29.200]) by orsmga003.jf.intel.com with ESMTP; 16 Mar 2021 19:45:24 -0700 Received: from debox1-desk2.jf.intel.com (debox1-desk2.jf.intel.com [10.54.75.16]) by linux.intel.com (Postfix) with ESMTP id 7F1E4580812; Tue, 16 Mar 2021 19:45:24 -0700 (PDT) From: "David E. Box" To: hdegoede@redhat.com, mgross@linux.intel.com Cc: "David E. Box" , lee.jones@linaro.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0 Date: Tue, 16 Mar 2021 19:44:54 -0700 Message-Id: <20210317024455.3071477-1-david.e.box@linux.intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Initialize the struct resource in intel_pmt_dev_register to zero to avoid a fault should the char *name field be non-zero. Signed-off-by: David E. Box --- Base commit is v5.12-rc3. drivers/platform/x86/intel_pmt_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel_pmt_class.c b/drivers/platform/x86/intel_pmt_class.c index c8939fba4509..ee2b3bbeb83d 100644 --- a/drivers/platform/x86/intel_pmt_class.c +++ b/drivers/platform/x86/intel_pmt_class.c @@ -173,7 +173,7 @@ static int intel_pmt_dev_register(struct intel_pmt_entry *entry, struct intel_pmt_namespace *ns, struct device *parent) { - struct resource res; + struct resource res = {0}; struct device *dev; int ret; base-commit: 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 -- 2.25.1