Showing error 1681

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: 425
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-10 07:54:05 UTC


Source:

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
405        data = substream->runtime->private_data;
406        snd_als300_dbgcallenter();
407        kfree(data);
408        chip->playback_substream = NULL;
409        snd_pcm_lib_free_pages(substream);
410        snd_als300_dbgcallleave();
411        return 0;
412}
413
414static int snd_als300_capture_open(struct snd_pcm_substream *substream)
415{
416        struct snd_als300 *chip = snd_pcm_substream_chip(substream);
417        struct snd_pcm_runtime *runtime = substream->runtime;
418        struct snd_als300_substream_data *data = kzalloc(sizeof(*data),
419                                                                GFP_KERNEL);
420
421        snd_als300_dbgcallenter();
422        chip->capture_substream = substream;
423        runtime->hw = snd_als300_capture_hw;
424        runtime->private_data = data;
425        data->control_register = RECORD_CONTROL;
426        data->block_counter_register = RECORD_BLOCK_COUNTER;
427        snd_als300_dbgcallleave();
428        return 0;
429}
430
431static int snd_als300_capture_close(struct snd_pcm_substream *substream)
432{
433        struct snd_als300 *chip = snd_pcm_substream_chip(substream);
434        struct snd_als300_substream_data *data;
435
Show full sources