linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: Eric Wong <normalperson@yhbt.net>
Cc: mchehab@osg.samsung.com, hans.verkuil@cisco.com,
	laurent.pinchart@ideasonboard.com, tiwai@suse.de, perex@perex.cz,
	agoode@google.com, pierre-louis.bossart@linux.intel.com,
	gtmkramer@xs4all.nl, clemens@ladisch.de, vladcatoi@gmail.com,
	damien@zamaudio.com, chris.j.arges@canonical.com,
	takamichiho@gmail.com, misterpib@gmail.com, daniel@zonque.org,
	pmatilai@laiskiainen.org, jussi@sonarnerd.net,
	fisch602@gmail.com, joe@oampo.co.uk, linux-media@vger.kernel.org,
	alsa-devel@alsa-project.org, Shuah Khan <shuahkh@osg.samsung.com>
Subject: Re: [PATCH 2/2] sound/usb: Update ALSA driver to use media controller API
Date: Mon, 11 May 2015 10:09:24 -0600	[thread overview]
Message-ID: <5550D434.6000906@osg.samsung.com> (raw)
In-Reply-To: <20150509045109.GA6528@dcvr.yhbt.net>

On 05/08/2015 10:51 PM, Eric Wong wrote:
> Shuah Khan <shuahkh@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@osg.samsung.com | (970) 217-8978

  reply	other threads:[~2015-05-11 16:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 19:31 [PATCH 0/2] Update ALSA driver to use media controller API Shuah Khan
2015-05-08 19:31 ` [PATCH 1/2] media: new media controller API for device resource support Shuah Khan
2015-05-29 10:34   ` Hans Verkuil
2015-05-08 19:31 ` [PATCH 2/2] sound/usb: Update ALSA driver to use media controller API Shuah Khan
2015-05-09  4:51   ` Eric Wong
2015-05-11 16:09     ` Shuah Khan [this message]
2015-05-27 15:24   ` Takashi Iwai
2015-06-01 15:51     ` Shuah Khan
2015-05-29 10:43   ` Hans Verkuil
2015-05-22 20:34 ` [PATCH 0/2] " Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5550D434.6000906@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=agoode@google.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=chris.j.arges@canonical.com \
    --cc=clemens@ladisch.de \
    --cc=damien@zamaudio.com \
    --cc=daniel@zonque.org \
    --cc=fisch602@gmail.com \
    --cc=gtmkramer@xs4all.nl \
    --cc=hans.verkuil@cisco.com \
    --cc=joe@oampo.co.uk \
    --cc=jussi@sonarnerd.net \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@osg.samsung.com \
    --cc=misterpib@gmail.com \
    --cc=normalperson@yhbt.net \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=pmatilai@laiskiainen.org \
    --cc=takamichiho@gmail.com \
    --cc=tiwai@suse.de \
    --cc=vladcatoi@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).