]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: core: fix the memory leak in case of device_add() failure
authorChuansheng Liu <chuansheng.liu@intel.com>
Tue, 25 Dec 2012 16:56:05 +0000 (00:56 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 27 Dec 2012 16:14:43 +0000 (16:14 +0000)
commit4f60cf17fc6cc85d2c63f9e4c5c3399b01d97ab3
tree39e8c354c99d0118c037bfb4ac503046c2ce2ad7
parenta565b05e9b162e3bcbdd259d187ee30904be5415
ASoC: core: fix the memory leak in case of device_add() failure

After called device_initialize(), even device_add() returns
error, we still need use the put_device() to release the reference
to call rtd_release(), which will do the free() action.

Signed-off-by: liu chuansheng <chuansheng.liu@intel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c