mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: Intel: catpt: Switch to snd_snd_component_new()
snd_soc_component_alloc() leaves the component object in uninitialized state. Switch to the constructor function to retrieve and operate on object in sane state. Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007133353.455185-6-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c0e1ffec60
commit
6cb74a0741
|
|
@ -1073,13 +1073,9 @@ int catpt_register_plat_component(struct catpt_dev *cdev)
|
|||
{
|
||||
struct snd_soc_component *component;
|
||||
|
||||
component = snd_soc_component_alloc(cdev->dev);
|
||||
if (!component)
|
||||
return -ENOMEM;
|
||||
component = snd_soc_component_new(cdev->dev, catpt_comp_driver.name, &catpt_comp_driver);
|
||||
if (IS_ERR(component))
|
||||
return PTR_ERR(component);
|
||||
|
||||
snd_soc_component_set_name(component, catpt_comp_driver.name);
|
||||
|
||||
return snd_soc_register_component(component,
|
||||
&catpt_comp_driver,
|
||||
dai_drivers, ARRAY_SIZE(dai_drivers));
|
||||
return snd_soc_component_register(component, dai_drivers, ARRAY_SIZE(dai_drivers));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user