Skip to content

Commit

Permalink
ASoC: Fix NULL pointer dereference in __pxa2xx_pcm_hw_free
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Daniel Mack authored and Mark Brown committed Jul 9, 2009
1 parent 637a935 commit b7d4de7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sound/arm/pxa2xx-pcm-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int __pxa2xx_pcm_hw_free(struct snd_pcm_substream *substream)
{
struct pxa2xx_runtime_data *rtd = substream->runtime->private_data;

if (rtd && rtd->params)
if (rtd && rtd->params && rtd->params->drcmr)
*rtd->params->drcmr = 0;

snd_pcm_set_runtime_buffer(substream, NULL);
Expand Down

0 comments on commit b7d4de7

Please sign in to comment.