diff mbox

[v1] ASoC: rockchip: fix a misjudgement by return

Message ID 1440487137-27989-2-git-send-email-zhengxing@rock-chips.com (mailing list archive)
State Accepted
Commit f8ce20005d1694584448cd544be5fb32416a277c
Headers show

Commit Message

zhengxing Aug. 25, 2015, 7:18 a.m. UTC
Being careless, judge the return value of snd_soc_card_jack_new
is opposite, so it should be fixed.

---

Changes in v1:
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Reviewed-by: Dylan Reid <dgreid@chromium.org>

 sound/soc/rockchip/rockchip_rt5645.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/sound/soc/rockchip/rockchip_rt5645.c b/sound/soc/rockchip/rockchip_rt5645.c
index 3c6bb1e..adfe98c 100644
--- a/sound/soc/rockchip/rockchip_rt5645.c
+++ b/sound/soc/rockchip/rockchip_rt5645.c
@@ -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;
 	}