ASoC: rockchip: fix a misjudgement by return
authorXing Zheng <zhengxing@rock-chips.com>
Tue, 25 Aug 2015 07:52:42 +0000 (15:52 +0800)
committerMark Brown <broonie@kernel.org>
Wed, 26 Aug 2015 11:13:19 +0000 (12:13 +0100)
Being careless, judge the return value of snd_soc_card_jack_new
is opposite, so it should be fixed.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/rockchip/rockchip_rt5645.c

index 3c6bb1ea06ecec51ec53e61f61534e8664d99802..adfe98c5d26fb199a082656fb0163767535ed5f3 100644 (file)
@@ -118,7 +118,7 @@ static int rk_init(struct snd_soc_pcm_runtime *runtime)
                                    SND_JACK_BTN_0 | SND_JACK_BTN_1 |
                                    SND_JACK_BTN_2 | SND_JACK_BTN_3,
                                    &headset_jack, NULL, 0);
-       if (!ret) {
+       if (ret) {
                dev_err(card->dev, "New Headset Jack failed! (%d)\n", ret);
                return ret;
        }