[alsa-devel] [PATCH 4/6] bebob: Use different labels for digital input/output interfaces

Takashi Sakamoto o-takashi at sakamocchi.jp
Mon Jul 21 12:49:56 CEST 2014


(Jul 21 2014 18:58), Takashi Iwai wrote:
>> @@ -498,6 +498,8 @@ static int special_dig_in_iface_ctl_set(struct snd_kcontrol *kctl,
>>  	int err;
>>  
>>  	id = uval->value.enumerated.item[0];
>> +	if (id >= ARRAY_SIZE(special_dig_in_iface_labels))
>> +		return 0;
> 
> This should return an error.

>> @@ -571,6 +577,8 @@ static int special_dig_out_iface_ctl_set(struct snd_kcontrol *kctl,
>>  	int err;
>>  
>>  	id = uval->value.enumerated.item[0];
>> +	if (id >= ARRAY_SIZE(special_dig_out_iface_labels))
>> +		return 0;
> 
> Ditto.

Oops, exactly. I use -EINVAL for the error code. Thank you.


Takashi Sakamoto
o-takashi at sakamocchi.jp



More information about the Alsa-devel mailing list