• Peter Ujfalusi's avatar
    ASoC: omap-abe-twl6040: Fix missing audio card caused by deferred probing · fd92adfb
    Peter Ujfalusi authored
    [ Upstream commit 76836fd354922ebe4798a64fda01f8dc6a8b0984 ]
    
    The machine driver fails to probe in next-20181113 with:
    
    [    2.539093] omap-abe-twl6040 sound: ASoC: CODEC DAI twl6040-legacy not registered
    [    2.546630] omap-abe-twl6040 sound: devm_snd_soc_register_card() failed: -517
    ...
    [    3.693206] omap-abe-twl6040 sound: ASoC: Both platform name/of_node are set for TWL6040
    [    3.701446] omap-abe-twl6040 sound: ASoC: failed to init link TWL6040
    [    3.708007] omap-abe-twl6040 sound: devm_snd_soc_register_card() failed: -22
    [    3.715148] omap-abe-twl6040: probe of sound failed with error -22
    
    Bisect pointed to a merge commit:
    first bad commit: [0f688ab20a540aafa984c5dbd68a71debebf4d7f] Merge remote-tracking branch 'net-next/master'
    
    and a diff between a working kernel does not reveal anything which would
    explain the change in behavior.
    
    Further investigation showed that on the second try of loading fails
    because the dai_link->platform is no longer NULL and it might be pointing
    to uninitialized memory.
    
    The fix is to move the snd_soc_dai_link and snd_soc_card inside of the
    abe_twl6040 struct, which is dynamically allocated every time the driver
    probes.
    Signed-off-by: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
    Signed-off-by: default avatarMark Brown <broonie@kernel.org>
    Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
    fd92adfb
Name
Last commit
Last update
Documentation Loading commit data...
arch Loading commit data...
block Loading commit data...
certs Loading commit data...
crypto Loading commit data...
drivers Loading commit data...
firmware Loading commit data...
fs Loading commit data...
include Loading commit data...
init Loading commit data...
ipc Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
net Loading commit data...
samples Loading commit data...
scripts Loading commit data...
security Loading commit data...
sound Loading commit data...
tools Loading commit data...
usr Loading commit data...
virt Loading commit data...
.cocciconfig Loading commit data...
.get_maintainer.ignore Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
Kbuild Loading commit data...
Kconfig Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README Loading commit data...
REPORTING-BUGS Loading commit data...