From patchwork Wed Aug 10 13:42:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9273031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4A0B4600CB for ; Wed, 10 Aug 2016 13:45:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3AABE28174 for ; Wed, 10 Aug 2016 13:45:13 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EE1B283A6; Wed, 10 Aug 2016 13:45:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id C1C3928174 for ; Wed, 10 Aug 2016 13:45:12 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXTmv-0001vj-B5; Wed, 10 Aug 2016 13:43:17 +0000 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bXTmp-0001t2-TZ for linux-arm-kernel@lists.infradead.org; Wed, 10 Aug 2016 13:43:12 +0000 Received: by mail-pf0-x243.google.com with SMTP id i6so2903362pfe.0 for ; Wed, 10 Aug 2016 06:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZBqbBE2Pe/muED/pXqinD2NIawp75LKDFAaJpZRPWGw=; b=r/SyaHjilySQoZQqTjIUk4ORPfJo1KA8FMEaSevuh72igWQSXre/o5KtLsUQGT8OCH GBWeLSqVS13g7aq4ZdAeWUTey6CCma6h/7lDOGLRI76Aur4Krx7FMJcWcm8fq/nsta7w kh2MelBwSfzvcLdq2QLQZsYjbRWjaXfW8J87KgJQvWfPoRbozMQR4ldVlQocZ3qpBFWi 3DJMwNbG0JwrSCGRsqU50CVOfhe/SDSTx3nf5rH9c2Aj90IatyBqqLCYenCCLstuXcAH d4h3IliwMzuVs6k7wdont2IpQXwbc3e3mVUCDLKPTfi7cQMH/AEvz7gPsgMNUdhF1yzB AWhg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ZBqbBE2Pe/muED/pXqinD2NIawp75LKDFAaJpZRPWGw=; b=bNy1MA3gP6yyVoo+AoR8AUE6cNbQJ6tAwVvCIpe39yhq54ObHwvmACh3teuDiAouw9 pcTOSYHAK0EwLeDNR+pSQnrjHkdHBXDQj2T3VWVEBl3tTtvMj6ltePttc3hI7szK01DH X5RnteB5Cf0m+z0gd3zorh9dMUvI7zNsi2Ml/de4e2NwOnYE2dL8RqrxSf0SH1Nvn0NM dnSx1f6g4+FSkcxcBv0gwOByj9T6T/4Q+Swc28w0Tdh6PazXZCzo1V18yXXoddBKAW62 9vm2TjjtKeoHGtD/iJHj/r/Sv1nL5bJgrXH/f+PmHEDos1J98c3MWtey6mNSJgBa1qSt DPew== X-Gm-Message-State: AEkoouvgM/xkCr1JoNpp3Dhnx2VupbccUC+N/QXKNcKxI52OkVH4Dm8hVEYr27asF64Oxw== X-Received: by 10.98.36.15 with SMTP id r15mr7342184pfj.1.1470836570925; Wed, 10 Aug 2016 06:42:50 -0700 (PDT) Received: from bogon.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id p75sm64245119pfa.71.2016.08.10.06.42.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 10 Aug 2016 06:42:50 -0700 (PDT) From: Wei Yongjun To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, maxime.ripard@free-electrons.com, wens@csie.org, kuninori.morimoto.gx@renesas.com, emilio@elopez.com.ar, hdegoede@redhat.com, ats@offog.org, fengguang.wu@intel.com Subject: [PATCH -next] ASoC: sun4i-codec: Fix error return code in sun4i_codec_probe() Date: Wed, 10 Aug 2016 13:42:34 +0000 Message-Id: <1470836554-11569-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160810_064312_002304_7F1F17BA X-CRM114-Status: GOOD ( 11.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: alsa-devel@alsa-project.org, Wei Yongjun , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix to return error code -ENOMEM instead of 0 when create card failed, as done elsewhere in this function. Fixes: 45fb6b6f2aa3 ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs") Signed-off-by: Wei Yongjun --- sound/soc/sunxi/sun4i-codec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 0e19c50..e741659 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c @@ -846,6 +846,7 @@ static int sun4i_codec_probe(struct platform_device *pdev) card = sun4i_codec_create_card(&pdev->dev); if (!card) { dev_err(&pdev->dev, "Failed to create our card\n"); + ret = -ENOMEM; goto err_unregister_codec; }