Showing error 1908

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: sound/pci/hda/patch_realtek.c
Line in file: 2752
Project: Linux Kernel
Project version: 2.6.28
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

 2722        if (spec->multiout.dig_out_nid || spec->dig_in_nid) {
 2723                codec->num_pcms = 2;
 2724                info = spec->pcm_rec + 1;
 2725                info->name = spec->stream_name_digital;
 2726                info->pcm_type = HDA_PCM_TYPE_SPDIF;
 2727                if (spec->multiout.dig_out_nid &&
 2728                    spec->stream_digital_playback) {
 2729                        info->stream[SNDRV_PCM_STREAM_PLAYBACK] = *(spec->stream_digital_playback);
 2730                        info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = spec->multiout.dig_out_nid;
 2731                }
 2732                if (spec->dig_in_nid &&
 2733                    spec->stream_digital_capture) {
 2734                        info->stream[SNDRV_PCM_STREAM_CAPTURE] = *(spec->stream_digital_capture);
 2735                        info->stream[SNDRV_PCM_STREAM_CAPTURE].nid = spec->dig_in_nid;
 2736                }
 2737                /* FIXME: do we need this for all Realtek codec models? */
 2738                codec->spdif_status_reset = 1;
 2739        }
 2740
 2741        /* If the use of more than one ADC is requested for the current
 2742         * model, configure a second analog capture-only PCM.
 2743         */
 2744        /* Additional Analaog capture for index #2 */
 2745        if ((spec->alt_dac_nid && spec->stream_analog_alt_playback) ||
 2746            (spec->num_adc_nids > 1 && spec->stream_analog_alt_capture)) {
 2747                codec->num_pcms = 3;
 2748                info = spec->pcm_rec + 2;
 2749                info->name = spec->stream_name_analog;
 2750                if (spec->alt_dac_nid) {
 2751                        info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
 2752                                *spec->stream_analog_alt_playback;
 2753                        info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid =
 2754                                spec->alt_dac_nid;
 2755                } else {
 2756                        info->stream[SNDRV_PCM_STREAM_PLAYBACK] =
 2757                                alc_pcm_null_stream;
 2758                        info->stream[SNDRV_PCM_STREAM_PLAYBACK].nid = 0;
 2759                }
 2760                if (spec->num_adc_nids > 1) {
 2761                        info->stream[SNDRV_PCM_STREAM_CAPTURE] =
 2762                                *spec->stream_analog_alt_capture;
Show full sources