diff options
author | David E. Box <david.e.box@linux.intel.com> | 2021-03-17 03:44:54 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2021-03-23 21:05:47 +0100 |
commit | 501bb68a66cfc0bc2a2458483400cb49daca974f (patch) | |
tree | 8fd4e747496e77f162805757cb622d3b24f251b7 | |
parent | platform/x86: thinkpad_acpi: sysfs interface to get wwan antenna type (diff) | |
download | linux-501bb68a66cfc0bc2a2458483400cb49daca974f.tar.xz linux-501bb68a66cfc0bc2a2458483400cb49daca974f.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>
-rw-r--r-- | drivers/platform/x86/intel_pmt_class.c | 2 |
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 228e21f1ce5c..c86ff15b1ed5 100644 --- a/drivers/platform/x86/intel_pmt_class.c +++ b/drivers/platform/x86/intel_pmt_class.c @@ -219,7 +219,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; |