Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd2033f27f346610b11b40a74ff7d1d023abcfd9
Commit:     bd2033f27f346610b11b40a74ff7d1d023abcfd9
Parent:     d9301263cce69ee4ef989de5bbe57515ef71a780
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 10 19:49:31 2006 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Wed Dec 20 08:55:39 2006 +0100

    [ALSA] hda-codec - Fix wrong error checks in patch_{realtek,analog}.c
    
    Fix wrong error checks of *_ch_mode_put() in patch_realtek.c and
    patch_analog.c.  snd_hda_ch_mode_put() could return a positive
    value for success, too.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/patch_analog.c  |    2 +-
 sound/pci/hda/patch_realtek.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/hda/patch_analog.c b/sound/pci/hda/patch_analog.c
index edd22de..2e0db62 100644
--- a/sound/pci/hda/patch_analog.c
+++ b/sound/pci/hda/patch_analog.c
@@ -1640,7 +1640,7 @@ static int ad198x_ch_mode_put(struct snd_kcontrol 
*kcontrol,
        int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
                                      spec->num_channel_mode,
                                      &spec->multiout.max_channels);
-       if (! err && spec->need_dac_fix)
+       if (err >= 0 && spec->need_dac_fix)
                spec->multiout.num_dacs = spec->multiout.max_channels / 2;
        return err;
 }
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index fb96144..5f55679 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -271,7 +271,7 @@ static int alc_ch_mode_put(struct snd_kcontrol *kcontrol,
        int err = snd_hda_ch_mode_put(codec, ucontrol, spec->channel_mode,
                                      spec->num_channel_mode,
                                      &spec->multiout.max_channels);
-       if (! err && spec->need_dac_fix)
+       if (err >= 0 && spec->need_dac_fix)
                spec->multiout.num_dacs = spec->multiout.max_channels / 2;
        return err;
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to