1
0
mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2026-01-20 05:13:55 +00:00

platform/x86/amd/pmc: fix leak in probe()

Call pci_dev_put(rdev) before returning.

Fixes: 6ad1b2dc0f2a ("platform/x86/amd/pmc: Use managed APIs for mutex")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/65e2fffb-a1cb-4297-b725-661d6b790a05@stanley.mountain
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
This commit is contained in:
Dan Carpenter 2025-03-12 11:31:57 +03:00 committed by Ilpo Järvinen
parent f895f24930
commit 01db3d1ff4
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -785,7 +785,7 @@ static int amd_pmc_probe(struct platform_device *pdev)
err = devm_mutex_init(dev->dev, &dev->lock);
if (err)
return err;
goto err_pci_dev_put;
/* Get num of IP blocks within the SoC */
amd_pmc_get_ip_info(dev);