mirror of
https://github.com/torvalds/linux.git
synced 2026-12-04 12:24:18 +00:00
platform/x86/amd/pmc: fix leak in probe()
Call pci_dev_put(rdev) before returning.
Fixes: 6ad1b2dc0f ("platform/x86/amd/pmc: Use managed APIs for mutex")
Signed-off-by: Dan Carpenter <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Ilpo Järvinen <[email protected]>
Signed-off-by: Ilpo Järvinen <[email protected]>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user