Showing error 1680

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: sound/pci/als300.c
Line in file: 394
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

364static struct snd_pcm_hardware snd_als300_capture_hw =
365{
366        .info =                        (SNDRV_PCM_INFO_MMAP |
367                                SNDRV_PCM_INFO_INTERLEAVED |
368                                SNDRV_PCM_INFO_PAUSE |
369                                SNDRV_PCM_INFO_MMAP_VALID),
370        .formats =                SNDRV_PCM_FMTBIT_S16,
371        .rates =                SNDRV_PCM_RATE_48000,
372        .rate_min =                48000,
373        .rate_max =                48000,
374        .channels_min =                2,
375        .channels_max =                2,
376        .buffer_bytes_max =        64 * 1024,
377        .period_bytes_min =        64,
378        .period_bytes_max =        32 * 1024,
379        .periods_min =                2,
380        .periods_max =                2,
381};
382
383static int snd_als300_playback_open(struct snd_pcm_substream *substream)
384{
385        struct snd_als300 *chip = snd_pcm_substream_chip(substream);
386        struct snd_pcm_runtime *runtime = substream->runtime;
387        struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
388                                                                GFP_KERNEL);
389
390        snd_als300_dbgcallenter();
391        chip->playback_substream = substream;
392        runtime->hw = snd_als300_playback_hw;
393        runtime->private_data = data;
394        data->control_register = PLAYBACK_CONTROL;
395        data->block_counter_register = PLAYBACK_BLOCK_COUNTER;
396        snd_als300_dbgcallleave();
397        return 0;
398}
399
400static int snd_als300_playback_close(struct snd_pcm_substream *substream)
401{
402        struct snd_als300 *chip = snd_pcm_substream_chip(substream);
403        struct snd_als300_substream_data *data;
404
Show full sources