summaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorDavid E. Box <david.e.box@linux.intel.com>2021-03-17 03:44:54 +0100
committerHans de Goede <hdegoede@redhat.com>2021-03-23 21:49:56 +0100
commit7547deff8a221e6bf1e563cf1b636844a8e5378a (patch)
treeb49b924066203940764c83b5bed9d306c4cb0984 /drivers/platform
parentplatform/x86: intel-vbtn: Stop reporting SW_DOCK events (diff)
downloadlinux-7547deff8a221e6bf1e563cf1b636844a8e5378a.tar.xz
linux-7547deff8a221e6bf1e563cf1b636844a8e5378a.zip
platform/x86: intel_pmt_class: Initial resource to 0
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 <david.e.box@linux.intel.com> Link: https://lore.kernel.org/r/20210317024455.3071477-1-david.e.box@linux.intel.com Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/intel_pmt_class.c2
1 files changed, 1 insertions, 1 deletions
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;