mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Check for rtd->params->drcmr != NULL before accessing it. Signed-off-by: Daniel Mack <daniel@caiaq.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
637a935aab
commit
b7d4de7ff0
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
|
||||||
{
|
{
|
||||||
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
|
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;
|
||||||
|
|
||||||
if (rtd && rtd->params)
|
if (rtd && rtd->params && rtd->params->drcmr)
|
||||||
*rtd->params->drcmr = 0;
|
*rtd->params->drcmr = 0;
|
||||||
|
|
||||||
snd_pcm_set_runtime_buffer(substream, NULL);
|
snd_pcm_set_runtime_buffer(substream, NULL);
|
||||||
|
|
Loading…
Reference in a new issue