Showing error 1906

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


Source:

738                                AK_VOL_CVT | AK_IPGA;
739                else
740                        knew.private_value =
741                                AK_COMPOSE(idx/2, (idx%2) + 4, 0, 163) |
742                                AK_VOL_CVT | AK_IPGA;
743                knew.tlv.p = db_scale_vol_datt;
744                err = snd_ctl_add(ak->card, snd_ctl_new1(&knew, ak));
745                if (err < 0)
746                        return err;
747
748                if (ak->type == SND_AK5365 && (idx % 2) == 0) {
749                        if (! ak->adc_info || 
750                            ! ak->adc_info[mixer_ch].switch_name) {
751                                knew.name = "Capture Switch";
752                                knew.index = mixer_ch + ak->idx_offset * 2;
753                        } else
754                                knew.name = ak->adc_info[mixer_ch].switch_name;
755                        knew.info = ak4xxx_switch_info;
756                        knew.get = ak4xxx_switch_get;
757                        knew.put = ak4xxx_switch_put;
758                        knew.access = 0;
759                        /* register 2, bit 0 (SMUTE): 0 = normal operation,
760                           1 = mute */
761                        knew.private_value =
762                                AK_COMPOSE(idx/2, 2, 0, 0) | AK_INVERT;
763                        err = snd_ctl_add(ak->card, snd_ctl_new1(&knew, ak));
764                        if (err < 0)
765                                return err;
766
767                        memset(&knew, 0, sizeof(knew));
768                        knew.name = ak->adc_info[mixer_ch].selector_name;
769                        if (!knew.name) {
770                                knew.name = "Capture Channel";
771                                knew.index = mixer_ch + ak->idx_offset * 2;
772                        }
773
774                        knew.iface = SNDRV_CTL_ELEM_IFACE_MIXER;
775                        knew.info = ak4xxx_capture_source_info;
776                        knew.get = ak4xxx_capture_source_get;
777                        knew.put = ak4xxx_capture_source_put;
778                        knew.access = 0;
Show full sources