mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/8] platform/x86/intel/pmc: Fix in mtl_punit_pmt_init()
@ 2023-12-19  4:22 rjingar
  2023-12-19  4:22 ` [PATCH 2/8] platform/x86/intel/pmc: Add PSON residency counter rjingar
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: rjingar @ 2023-12-19  4:22 UTC (permalink / raw)
  To: irenic.rajneesh, david.e.box, hdegoede, ilpo.jarvinen,
	platform-driver-x86, linux-kernel
  Cc: rajvi.jingar, David E . Box

From: Rajvi Jingar <rajvi.jingar@linux.intel.com>

pci_get_domain_bus_and_slot() increases the reference count on the pci
device that is used to register the endpoint. In case of failure in
registration, decrease reference count using pci_dev_put(pcidev) before
returning.

Fixes: 6e7964855381 ("platform/x86/intel/pmc: Show Die C6 counter on Meteor Lake")
Signed-off-by: Rajvi Jingar <rajvi.jingar@linux.intel.com>
Signed-off-by: David E. Box <david.e.box@linux.intel.com>
---
 drivers/platform/x86/intel/pmc/mtl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/intel/pmc/mtl.c b/drivers/platform/x86/intel/pmc/mtl.c
index 38c2f946ec23..fb59dffccf28 100644
--- a/drivers/platform/x86/intel/pmc/mtl.c
+++ b/drivers/platform/x86/intel/pmc/mtl.c
@@ -985,6 +985,7 @@ static void mtl_punit_pmt_init(struct pmc_dev *pmcdev)
 	}
 
 	ep = pmt_telem_find_and_register_endpoint(pcidev, MTL_PMT_DMU_GUID, 0);
+	pci_dev_put(pcidev);
 	if (IS_ERR(ep)) {
 		dev_err(&pmcdev->pdev->dev,
 			"pmc_core: couldn't get DMU telem endpoint, %ld\n",
@@ -992,7 +993,6 @@ static void mtl_punit_pmt_init(struct pmc_dev *pmcdev)
 		return;
 	}
 
-	pci_dev_put(pcidev);
 	pmcdev->punit_ep = ep;
 
 	pmcdev->has_die_c6 = true;
-- 
2.34.1


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

end of thread, other threads:[~2023-12-19 15:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-19  4:22 [PATCH 1/8] platform/x86/intel/pmc: Fix in mtl_punit_pmt_init() rjingar
2023-12-19  4:22 ` [PATCH 2/8] platform/x86/intel/pmc: Add PSON residency counter rjingar
2023-12-19  4:22 ` [PATCH 3/8] platform/x86/intel/pmc: Add regmap for Tiger Lake H PCH rjingar
2023-12-19  4:22 ` [PATCH 4/8] platform/x86/intel/pmc: Add PSON residency counter for Alder Lake rjingar
2023-12-19  4:22 ` [PATCH 5/8] platform/x86/intel/pmc: Move common code to core.c rjingar
2023-12-19  4:22 ` [PATCH 6/8] platform/x86/intel/pmc: Add ssram_init flag in PMC discovery in Meteor Lake rjingar
2023-12-19  4:22 ` [PATCH 7/8] platform/x86/intel/pmc: Add Arrow Lake S support to intel_pmc_core driver rjingar
2023-12-19  4:22 ` [PATCH 8/8] platform/x86/intel/pmc: Add Lunar Lake M " rjingar
2023-12-19 15:49 ` [PATCH 1/8] platform/x86/intel/pmc: Fix in mtl_punit_pmt_init() 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

all inboxes | Powered by JetHome®