We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c183cf6 commit 6ad1b2dCopy full SHA for 6ad1b2d
drivers/platform/x86/amd/pmc/pmc.c
@@ -783,7 +783,9 @@ static int amd_pmc_probe(struct platform_device *pdev)
783
goto err_pci_dev_put;
784
}
785
786
- mutex_init(&dev->lock);
+ err = devm_mutex_init(dev->dev, &dev->lock);
787
+ if (err)
788
+ return err;
789
790
/* Get num of IP blocks within the SoC */
791
amd_pmc_get_ip_info(dev);
@@ -822,7 +824,6 @@ static void amd_pmc_remove(struct platform_device *pdev)
822
824
pci_dev_put(dev->rdev);
823
825
if (IS_ENABLED(CONFIG_AMD_MP2_STB))
826
amd_mp2_stb_deinit(dev);
- mutex_destroy(&dev->lock);
827
828
829
static const struct acpi_device_id amd_pmc_acpi_ids[] = {
0 commit comments