From patchwork Tue Aug 25 07:18:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: zhengxing X-Patchwork-Id: 7070061 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 790A69F374 for ; Tue, 25 Aug 2015 09:17:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AA5C9208B6 for ; Tue, 25 Aug 2015 09:17:21 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 485AB2088F for ; Tue, 25 Aug 2015 09:17:20 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 44A412610B1; Tue, 25 Aug 2015 11:17:19 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 76FF4260494; Tue, 25 Aug 2015 11:16:16 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id F40F8260832; Tue, 25 Aug 2015 11:16:13 +0200 (CEST) Received: from regular3.263xmail.com (regular3.263xmail.com [211.157.153.3]) by alsa0.perex.cz (Postfix) with ESMTP id 1835A260561 for ; Tue, 25 Aug 2015 11:15:10 +0200 (CEST) Received: from regular2.263xmail.com (unknown [192.168.165.161]) by regular3.263xmail.com (Postfix) with ESMTP id 305DF15EEA for ; Tue, 25 Aug 2015 15:20:21 +0800 (CST) Received: from regular1.263xmail.com (unknown [192.168.165.232]) by regular2.263xmail.com (Postfix) with ESMTP id EC43B18EBDC for ; Tue, 25 Aug 2015 15:19:57 +0800 (CST) Received: from zhengxing?rock-chips.com (unknown [192.168.167.157]) by regular1.263xmail.com (Postfix) with SMTP id 983B88E0C; Tue, 25 Aug 2015 15:19:34 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id EE3331BD35; Tue, 25 Aug 2015 15:19:20 +0800 (CST) X-RL-SENDER: zhengxing@rock-chips.com X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: zhengxing@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: zhengxing@rock-chips.com X-DNS-TYPE: 0 Received: from unknown (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith SMTP id 9903R5RTA8; Tue, 25 Aug 2015 15:19:31 +0800 (CST) From: Xing Zheng To: dgreid@chromium.org, dianders@chromium.org, heiko@sntech.de, sonnyrao@chromium.org Date: Tue, 25 Aug 2015 15:18:56 +0800 Message-Id: <1440487137-27989-2-git-send-email-zhengxing@rock-chips.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1440487137-27989-1-git-send-email-zhengxing@rock-chips.com> References: <1440487137-27989-1-git-send-email-zhengxing@rock-chips.com> Cc: alsa-devel@alsa-project.org, Xing Zheng , linux-kernel@vger.kernel.org, Takashi Iwai , Liam Girdwood , linux-rockchip@lists.infradead.org, Mark Brown , linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH v1] ASoC: rockchip: fix a misjudgement by return X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Dylan Reid sound/soc/rockchip/rockchip_rt5645.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }