]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hdac: fix memory release for SST and SOF drivers
authorAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Wed, 22 May 2019 16:21:41 +0000 (11:21 -0500)
committerMark Brown <broonie@kernel.org>
Thu, 6 Jun 2019 16:37:01 +0000 (17:37 +0100)
commitadeb3541be1a1b1ee0658de3dd1fdddb4d01fa16
tree16436647368b00dd04435ef436d42056b0dbfea4
parent5764067b0cd36ff530756d6d6514cba732e250fb
ALSA: hdac: fix memory release for SST and SOF drivers

During the integration of HDaudio support, we changed the way in which
we get hdev in snd_hdac_ext_bus_device_init() to use one preallocated
with devm_kzalloc(), however it still left kfree(hdev) in
snd_hdac_ext_bus_device_exit(). It leads to oopses when trying to
rmmod and modprobe. Fix it, by just removing kfree call.

SOF also uses some of the snd_hdac_ functions for HDAudio support but
allocated the memory with kzalloc. A matching fix is provided
separately to align all users of the snd_hdac_ library.

Fixes: b5bc04373831 ("ALSA: hdac: remove memory allocation from snd_hdac_ext_bus_device_init")
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/hda/ext/hdac_ext_bus.c