platform-driver-x86.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0
@ 2021-03-17  2:44 David E. Box
  2021-03-17  2:44 ` [PATCH 2/2] platform_x86: intel_pmt_crashlog: Fix incorrect macros David E. Box
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: David E. Box @ 2021-03-17  2:44 UTC (permalink / raw)
  To: hdegoede, mgross
  Cc: David E. Box, lee.jones, platform-driver-x86, linux-kernel

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>
---

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-03-23 20:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-17  2:44 [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0 David E. Box
2021-03-17  2:44 ` [PATCH 2/2] platform_x86: intel_pmt_crashlog: Fix incorrect macros David E. Box
2021-03-23 17:29 ` [PATCH 1/2] platform/x86: intel_pmt_class: Initial resource to 0 David E. Box
2021-03-23 20:15   ` Hans de Goede
2021-03-23 20:10 ` Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).