public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: hda - fix error return code in patch_alc662()
@ 2013-04-18  3:12 Wei Yongjun
  2013-04-18  7:55 ` Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Yongjun @ 2013-04-18  3:12 UTC (permalink / raw)
  To: perex, tiwai, david.henningsson, kailang
  Cc: yongjun_wei, alsa-devel, linux-kernel

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Fix to return a negative error code from the error handling
case instead of 0, as returned elsewhere in this function.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 sound/pci/hda/patch_realtek.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f15c36b..a3965b0 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -3787,7 +3787,8 @@ static int patch_alc662(struct hda_codec *codec)
 	if ((alc_get_coef0(codec) & (1 << 14)) &&
 	    codec->bus->pci->subsystem_vendor == 0x1025 &&
 	    spec->cdefine.platform_type == 1) {
-		if (alc_codec_rename(codec, "ALC272X") < 0)
+		err = alc_codec_rename(codec, "ALC272X");
+		if (err < 0)
 			goto error;
 	}
 


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re:[PATCH -next] ALSA: hda - fix error return code in patch_alc662()
@ 2013-04-18  4:09 Wang Shilong
  2013-04-18  4:14 ` [PATCH " Wang Shilong
  0 siblings, 1 reply; 4+ messages in thread
From: Wang Shilong @ 2013-04-18  4:09 UTC (permalink / raw)
  To: yongjun_wei, Wei Yongjun; +Cc: linux-kernel

Hello Wei,

+++ b/sound/pci/hda/patch_realtek.c
@@ -3787,7 +3787,8 @@ static int patch_alc662(struct hda_codec *codec)
 	if ((alc_get_coef0(codec) & (1 << 14)) &&
 	    codec->bus->pci->subsystem_vendor == 0x1025 &&
 	    spec->cdefine.platform_type == 1) {
-		if (alc_codec_rename(codec, "ALC272X") < 0)

I don't think we should fix this problem. And your changelog is wrong!

Thanks,
Wang
+		err = alc_codec_rename(codec, "ALC272X");
+		if (err < 0)
 			goto error;
 	}
 

--


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ALSA: hda - fix error return code in patch_alc662()
  2013-04-18  4:09 Re:[PATCH -next] ALSA: hda - fix error return code in patch_alc662() Wang Shilong
@ 2013-04-18  4:14 ` Wang Shilong
  0 siblings, 0 replies; 4+ messages in thread
From: Wang Shilong @ 2013-04-18  4:14 UTC (permalink / raw)
  To: Wang Shilong; +Cc: yongjun_wei, Wei Yongjun, linux-kernel

Sorry, i miss something..

Thanks,
wang

> Hello Wei,
> 
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3787,7 +3787,8 @@ static int patch_alc662(struct hda_codec *codec)
>  	if ((alc_get_coef0(codec) & (1 << 14)) &&
>  	    codec->bus->pci->subsystem_vendor == 0x1025 &&
>  	    spec->cdefine.platform_type == 1) {
> -		if (alc_codec_rename(codec, "ALC272X") < 0)
> 
> I don't think we should fix this problem. And your changelog is wrong!
> 
> Thanks,
> Wang
> +		err = alc_codec_rename(codec, "ALC272X");
> +		if (err < 0)
>  			goto error;
>  	}
>  
> 
> --
> 




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH -next] ALSA: hda - fix error return code in patch_alc662()
  2013-04-18  3:12 Wei Yongjun
@ 2013-04-18  7:55 ` Takashi Iwai
  0 siblings, 0 replies; 4+ messages in thread
From: Takashi Iwai @ 2013-04-18  7:55 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: perex, david.henningsson, kailang, yongjun_wei, alsa-devel,
	linux-kernel

At Thu, 18 Apr 2013 11:12:59 +0800,
Wei Yongjun wrote:
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Fix to return a negative error code from the error handling
> case instead of 0, as returned elsewhere in this function.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Thanks, applied.


Takashi

> ---
>  sound/pci/hda/patch_realtek.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
> index f15c36b..a3965b0 100644
> --- a/sound/pci/hda/patch_realtek.c
> +++ b/sound/pci/hda/patch_realtek.c
> @@ -3787,7 +3787,8 @@ static int patch_alc662(struct hda_codec *codec)
>  	if ((alc_get_coef0(codec) & (1 << 14)) &&
>  	    codec->bus->pci->subsystem_vendor == 0x1025 &&
>  	    spec->cdefine.platform_type == 1) {
> -		if (alc_codec_rename(codec, "ALC272X") < 0)
> +		err = alc_codec_rename(codec, "ALC272X");
> +		if (err < 0)
>  			goto error;
>  	}
>  
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-18  7:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-18  4:09 Re:[PATCH -next] ALSA: hda - fix error return code in patch_alc662() Wang Shilong
2013-04-18  4:14 ` [PATCH " Wang Shilong
  -- strict thread matches above, loose matches on Subject: below --
2013-04-18  3:12 Wei Yongjun
2013-04-18  7:55 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox