]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: fix the memory leak in case of remove_aux_dev()
authorChuansheng Liu <chuansheng.liu@intel.com>
Tue, 25 Dec 2012 16:57:32 +0000 (00:57 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 27 Dec 2012 16:14:43 +0000 (16:14 +0000)
commit01056476a810a8e31e9d025edddb2f6f59e20777
tree697ee9b31a828ea02ff3d93e93e9c876bb802633
parent4f60cf17fc6cc85d2c63f9e4c5c3399b01d97ab3
ASoC: core: fix the memory leak in case of remove_aux_dev()

When probing aux_dev, initializing is as below:
device_initialize()
device_add()

So when remove aux_dev, we need do as below:
device_del()
device_put()
Otherwise, the rtd_release() will not be called.

So here using device_unregister() to replace device_del(),
like the action in soc_remove_link_dais().
Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c