lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 18 Feb 2019 12:33:40 +0100 From: Sylwester Nawrocki <s.nawrocki@...sung.com> To: Krzysztof Kozlowski <krzk@...nel.org> Cc: broonie@...nel.org, lgirdwood@...il.com, sbkim73@...sung.com, Marek Szyprowski <m.szyprowski@...sung.com>, alsa-devel@...a-project.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH 2/2] ASoC: samsung: i2s: Fix multiple "IIS multi" devices initialization On 2/18/19 12:00, Krzysztof Kozlowski wrote: > On Fri, 15 Feb 2019 at 15:48, Sylwester Nawrocki <s.nawrocki@...sung.com> wrote: >> diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c >> index e36c44e2f1bb..4a6dd86459bc 100644 >> --- a/sound/soc/samsung/i2s.c >> +++ b/sound/soc/samsung/i2s.c >> @@ -1339,20 +1339,34 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) >> /* Create platform device for the secondary PCM */ >> static int i2s_create_secondary_device(struct samsung_i2s_priv *priv) >> { [...] >> + ret = platform_device_add(pdev_sec); >> if (ret < 0) { >> - dev_info(&pdev->dev, "device_attach() failed\n"); >> + platform_device_put(pdev_sec); >> return ret; >> } >> >> - priv->pdev_sec = pdev; >> + priv->pdev_sec = pdev_sec; >> + >> + ret = device_attach(&pdev_sec->dev); >> + if (ret < 0) { >> + dev_info(&pdev_sec->dev, "device_attach() failed\n"); > > Don't you need here platform_device_unregister()? It's in i2s_delete_secondary_device(), but it might be better indeed to add it here and move the priv->pdev_sec assignment to the end making it a last step. -- Thanks, Sylwester
Powered by blists - more mailing lists