User: | Jiri Slaby |
Error type: | Invalid Pointer Dereference |
Error type description: | A pointer which is invalid is being dereferenced |
File location: | sound/pci/riptide/riptide.c |
Line in file: | 1641 |
Project: | Linux Kernel |
Project version: | 2.6.28 |
Tools: |
Stanse
(1.2)
Smatch (1.59) |
Entered: | 2011-11-07 22:22:22 UTC |
1611 struct snd_riptide *chip = snd_pcm_substream_chip(substream); 1612 struct pcmhw *data = get_pcmhwdev(substream); 1613 struct cmdif *cif = chip->cif; 1614 1615 if (cif && data) { 1616 if (data->lbuspath) 1617 freelbuspath(cif, data->source, data->lbuspath); 1618 data->lbuspath = NULL; 1619 data->source = 0xff; 1620 data->intdec[0] = 0xff; 1621 data->intdec[1] = 0xff; 1622 1623 if (data->sgdlist.area) { 1624 snd_dma_free_pages(&data->sgdlist); 1625 data->sgdlist.area = NULL; 1626 } 1627 } 1628 return snd_pcm_lib_free_pages(substream); 1629} 1630 1631static int snd_riptide_playback_open(struct snd_pcm_substream *substream) 1632{ 1633 struct snd_riptide *chip = snd_pcm_substream_chip(substream); 1634 struct snd_pcm_runtime *runtime = substream->runtime; 1635 struct pcmhw *data; 1636 int sub_num = substream->number; 1637 1638 chip->playback_substream[sub_num] = substream; 1639 runtime->hw = snd_riptide_playback; 1640 data = kzalloc(sizeof(struct pcmhw), GFP_KERNEL); 1641 data->paths = lbus_play_paths[sub_num]; 1642 data->id = play_ids[sub_num]; 1643 data->source = play_sources[sub_num]; 1644 data->intdec[0] = 0xff; 1645 data->intdec[1] = 0xff; 1646 data->state = ST_STOP; 1647 runtime->private_data = data; 1648 return snd_pcm_hw_constraint_integer(runtime, 1649 SNDRV_PCM_HW_PARAM_PERIODS); 1650} 1651