[alsa-devel] [PATCH 2/2] sound/usb: Update ALSA driver to use media controller API

Shuah Khan shuahkh at osg.samsung.com
Mon May 11 18:09:24 CEST 2015


On 05/08/2015 10:51 PM, Eric Wong wrote:
> Shuah Khan <shuahkh at osg.samsung.com> wrote:
>> @@ -541,13 +591,19 @@ int snd_usb_create_quirk(struct snd_usb_audio *chip,
>>  		[QUIRK_AUDIO_ALIGN_TRANSFER] = create_align_transfer_quirk,
>>  		[QUIRK_AUDIO_STANDARD_MIXER] = create_standard_mixer_quirk,
>>  	};
>> +	int ret;
>>  
>> +	if (quirk->media_device) {
>> +		/* don't want to fail when media_device_init() doesn't work */
>> +		ret = media_device_init(iface);
>> +	}
>>  	if (quirk->type < QUIRK_TYPE_COUNT) {
>> -		return quirk_funcs[quirk->type](chip, iface, driver, quirk);
>> +		ret = quirk_funcs[quirk->type](chip, iface, driver, quirk);
>>  	} else {
>>  		usb_audio_err(chip, "invalid quirk type %d\n", quirk->type);
>>  		return -ENXIO;
>>  	}
>> +	return ret;
>>  }
> 
> What is the point of saving 'ret' of media_device_init if it'll
> only be clobbered or ignored for ENXIO?
> 

Agreed. There is no point in saving it.

thanks,
-- Shuah

-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh at osg.samsung.com | (970) 217-8978


More information about the Alsa-devel mailing list