On Fri, Jul 20, 2018 at 02:38:11PM +0800, Akshu Agrawal wrote: > static int cz_probe(struct platform_device *pdev) > { > int ret; > struct snd_soc_card *card; > struct acp_platform_info *machine; > + static bool regulators_registered; > + > + if (!regulators_registered) { > + ret = platform_device_register(&acp_da7219_regulator); > + if (ret) { > + dev_err(&pdev->dev, "Failed to register regulator: %d\n", > + ret); > + return ret; > + } > + regulators_registered = true; > + } You should be unregistering the regulator in your remove function, not doing this hack here. I'd also expect to see the card made the parent of the device that gets registered.