Skip to content

Commit

Permalink
ALSA: hda - fix error return code in patch_alc662()
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
  • Loading branch information
Wei Yongjun authored and Takashi Iwai committed Apr 18, 2013
1 parent 594813f commit 6134b1a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/pci/hda/patch_realtek.c
Original file line number Diff line number Diff line change
Expand Up @@ -4288,7 +4288,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;
}

Expand Down

0 comments on commit 6134b1a

Please sign in to comment.