[PATCH 1/3] EDAC/e752x: Use managed PCI device enablement

From: Myeonghun Pak

Date: Mon Sep 14 2026 - 22:00:35 EST


e752x_init_one() enables the PCI device without balancing the enable
reference on probe failure or removal. Use pcim_enable_device() so the
PCI device is disabled after failed probing and after driver removal.

This issue was identified during our ongoing static-analysis research
while reviewing kernel code.

Fixes: 806c35f5057a ("[PATCH] EDAC: drivers for AMD 76x and Intel E750x, E752x")
Cc: stable@xxxxxxxxxxxxxxx
Assisted-by: LLM
Co-developed-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Ijae Kim <ae878000@xxxxxxxxx>
Signed-off-by: Myeonghun Pak <mhun512@xxxxxxxxx>
---
drivers/edac/e752x_edac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -1387,7 +1387,7 @@ static int e752x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
edac_dbg(0, "\n");

/* wake up and enable device */
- if (pci_enable_device(pdev) < 0)
+ if (pcim_enable_device(pdev) < 0)
return -EIO;

return e752x_probe1(pdev, ent->driver_data);