From patchwork Mon Sep 1 01:35:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xiubo Li X-Patchwork-Id: 4815931 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC6399F375 for ; Mon, 1 Sep 2014 02:27:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 015D220131 for ; Mon, 1 Sep 2014 02:27:41 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5CDAC20120 for ; Mon, 1 Sep 2014 02:27:39 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4E5E4264F07; Mon, 1 Sep 2014 04:27:38 +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=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 0795D2625C4; Mon, 1 Sep 2014 04:27:02 +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 198AB261B2A; Mon, 1 Sep 2014 04:27:00 +0200 (CEST) Received: from na01-bn1-obe.outbound.protection.outlook.com (mail-bn1blp0182.outbound.protection.outlook.com [207.46.163.182]) by alsa0.perex.cz (Postfix) with ESMTP id 87CB4261B2A for ; Mon, 1 Sep 2014 04:26:55 +0200 (CEST) Received: from BY2PR03CA059.namprd03.prod.outlook.com (10.141.249.32) by DM2PR0301MB0624.namprd03.prod.outlook.com (25.160.95.28) with Microsoft SMTP Server (TLS) id 15.0.1015.19; Mon, 1 Sep 2014 02:26:52 +0000 Received: from BL2FFO11FD041.protection.gbl (2a01:111:f400:7c09::185) by BY2PR03CA059.outlook.office365.com (2a01:111:e400:2c5d::32) with Microsoft SMTP Server (TLS) id 15.0.1019.16 via Frontend Transport; Mon, 1 Sep 2014 02:26:51 +0000 Received: from az84smr01.freescale.net (192.88.158.2) by BL2FFO11FD041.mail.protection.outlook.com (10.173.161.137) with Microsoft SMTP Server (TLS) id 15.0.1010.11 via Frontend Transport; Mon, 1 Sep 2014 02:26:51 +0000 Received: from rock.ap.freescale.net (rock.ap.freescale.net [10.193.20.106]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id s812QQKx025706; Sun, 31 Aug 2014 19:26:45 -0700 From: Xiubo Li To: , , , , , , , Date: Mon, 1 Sep 2014 09:35:26 +0800 Message-ID: <1409535327-11449-2-git-send-email-Li.Xiubo@freescale.com> X-Mailer: git-send-email 1.8.0 In-Reply-To: <1409535327-11449-1-git-send-email-Li.Xiubo@freescale.com> References: <1409535327-11449-1-git-send-email-Li.Xiubo@freescale.com> X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:192.88.158.2; CTRY:US; IPV:CAL; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(6009001)(189002)(199003)(97736001)(2201001)(77982001)(68736004)(95666004)(87936001)(4396001)(105606002)(74662001)(106466001)(104166001)(86362001)(92566001)(89996001)(92726001)(44976005)(83322001)(93916002)(69596002)(26826002)(48376002)(19580405001)(81156004)(6806004)(85852003)(83072002)(88136002)(77156001)(79102001)(19580395003)(74502001)(90102001)(102836001)(50226001)(84676001)(229853001)(64706001)(50986999)(36756003)(85306004)(81542001)(46102001)(107046002)(20776003)(31966008)(50466002)(76482001)(21056001)(87286001)(62966002)(76176999)(99396002)(104016003)(81342001)(47776003)(80022001); DIR:OUT; SFP:; SCL:1; SRVR:DM2PR0301MB0624; H:az84smr01.freescale.net; FPR:; MLV:ovrnspm; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; MIME-Version: 1.0 X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;UriScan:; X-Forefront-PRVS: 03218BFD9F Received-SPF: Fail (protection.outlook.com: domain of freescale.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=Li.Xiubo@freescale.com; X-OriginatorOrg: freescale.com Cc: Xiubo Li , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCHv2 1/2] ASoC: simple-card: Fix bug of forgetting decrement DT node's refcount 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP We shouldn't forget decrement the last DT node when the for_each_child_of_node() has finished searching. Signed-off-by: Xiubo Li --- sound/soc/generic/simple-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index fd8b045..9e170fe 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -360,6 +360,7 @@ static int asoc_simple_card_parse_of(struct device_node *node, } i++; } + of_node_put(np); } else { ret = asoc_simple_card_dai_link_of(node, dev, dai_link, dai_props, true);