Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

David E. Box and committed by
Hans de Goede
501bb68a 3feb52a2

+1 -1
+1 -1
drivers/platform/x86/intel_pmt_class.c
··· 219 219 struct intel_pmt_namespace *ns, 220 220 struct device *parent) 221 221 { 222 - struct resource res; 222 + struct resource res = {0}; 223 223 struct device *dev; 224 224 int ret; 225 225