ALSA: hda - fix error return code in patch_alc662()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Thu, 18 Apr 2013 03:12:59 +0000 (11:12 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 18 Apr 2013 07:55:26 +0000 (09:55 +0200)
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>
sound/pci/hda/patch_realtek.c

index 74bf5f6595b9b4ee45a62adba71d7ae0f91dd9c4..28b3f5ac76dcf2cbf59cf18570ef5166cb9428e8 100644 (file)
@@ -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;
        }