When driver register its component to ALSA SoC, almost all drivers are
using snd_soc_register_component(), but soc-generic-dmaengine-pcm is
using snd_soc_add_component().
Existing component function had been assumed that registered component
was allocated, and it calling kfree() for it.
But, the user who used snd_soc_add_component() doesn't.
This patch uses devm_kzalloc() instead of kzalloc() for component,
and doesn't call kree() anymore.
This patch fixes commit 
be7ee5f32a9a ("ASoC: soc-generic-dmaengine-pcm:
replace platform to component").
Allwinner H3 SoC will crash without this patch.
Thanks Jernej report.
Reported-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
 err_cleanup:
        snd_soc_component_cleanup(component);
 err_free:
-       kfree(component);
        return ret;
 }
 EXPORT_SYMBOL_GPL(snd_soc_add_component);
 {
        struct snd_soc_component *component;
 
-       component = kzalloc(sizeof(*component), GFP_KERNEL);
+       component = devm_kzalloc(dev, sizeof(*component), GFP_KERNEL);
        if (!component)
                return -ENOMEM;
 
 
        if (found) {
                snd_soc_component_cleanup(component);
-               kfree(component);
        }
 
        return found;