if (ret)
                return ret;
 
-       daifmt = kzalloc(sizeof(*daifmt), GFP_KERNEL);
+       daifmt = devm_kzalloc(dai->dev, sizeof(*daifmt), GFP_KERNEL);
        if (!daifmt)
                return -ENOMEM;
 
        return 0;
 }
 
-static int hdmi_codec_dai_remove(struct snd_soc_dai *dai)
-{
-       kfree(dai->playback_dma_data);
-       return 0;
-}
-
 static const struct snd_soc_dai_driver hdmi_i2s_dai = {
        .name = "i2s-hifi",
        .id = DAI_ID_I2S,
        .probe = hdmi_dai_probe,
-       .remove = hdmi_codec_dai_remove,
        .playback = {
                .stream_name = "I2S Playback",
                .channels_min = 2,
        .name = "spdif-hifi",
        .id = DAI_ID_SPDIF,
        .probe = hdmi_dai_spdif_probe,
-       .remove = hdmi_codec_dai_remove,
        .playback = {
                .stream_name = "SPDIF Playback",
                .channels_min = 2,