]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - sound/soc/soc-core.c
ASoC: core: fix the memory leak in case of remove_aux_dev()
[~shefty/rdma-dev.git] / sound / soc / soc-core.c
index f7551c1c827ce76c16adbb9425b58fe23fe52f1c..2370063b58245946f71adfa05f361097d3e53374 100644 (file)
@@ -1556,7 +1556,7 @@ static void soc_remove_aux_dev(struct snd_soc_card *card, int num)
        /* unregister the rtd device */
        if (rtd->dev_registered) {
                device_remove_file(rtd->dev, &dev_attr_codec_reg);
-               device_del(rtd->dev);
+               device_unregister(rtd->dev);
                rtd->dev_registered = 0;
        }