From: Wei Yongjun Date: Thu, 18 Apr 2013 03:12:59 +0000 (+0800) Subject: ALSA: hda - fix error return code in patch_alc662() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=6134b1a25b684cc105c78631255eb33b36223c5c;p=linux-beck.git ALSA: hda - fix error return code in patch_alc662() 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 Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index 74bf5f6595b9..28b3f5ac76dc 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -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; }