On 05/08/2015 10:51 PM, Eric Wong wrote:
> Shuah Khan <[email protected]> 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)
[email protected] | (970) 217-8978
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to