From patchwork Sun Nov 9 12:45:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anil Kumar X-Patchwork-Id: 5260441 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 786DEC11AC for ; Sun, 9 Nov 2014 12:48:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 992BB2012D for ; Sun, 9 Nov 2014 12:48:42 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D3DDB20109 for ; Sun, 9 Nov 2014 12:48:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnRt6-0004AU-9M; Sun, 09 Nov 2014 12:46:36 +0000 Received: from mail-pa0-x235.google.com ([2607:f8b0:400e:c03::235]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XnRt4-000488-DG for linux-arm-kernel@lists.infradead.org; Sun, 09 Nov 2014 12:46:34 +0000 Received: by mail-pa0-f53.google.com with SMTP id kx10so6447833pab.12 for ; Sun, 09 Nov 2014 04:46:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=8WVi59xr6p8lZnQGRkyuJlXlZJnArUqvtoJF9fgYKvY=; b=Jy5rzF0dKsE8s6yhsHMI6SRnBgc/47kz0Qp8nI75pfxb8C2MSOKn7xu54HFuVMFkde 8l66lwKHaFrOtJbwAxrXVFqWYqQspov0IY+l2gyhZQZybYGMwQ81vfKrUa/Wa/dMHK6d lDFS5aPDtClCJIF8zEmd1ArCNp8lzPMwjH0WXQmOm9696meJUaw7wY+dJBSjO4C8n6Aj I7+DmrBB+toJbQif52swDo9NwgAbyapnAlADW4NSsLLUt1ykiED4g1hmlyIeHsNGNlrY QzR9WEl7rTorRE3Qh2i5wsxqbwbFc1ELwn5h2AmwzZayHkZU9SUWaRWXGJU04sGuJp/N Sl3g== X-Received: by 10.68.135.229 with SMTP id pv5mr25643645pbb.23.1415537171398; Sun, 09 Nov 2014 04:46:11 -0800 (PST) Received: from localhost.localdomain ([123.237.216.248]) by mx.google.com with ESMTPSA id fm15sm13770177pdb.58.2014.11.09.04.46.07 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 09 Nov 2014 04:46:10 -0800 (PST) From: Anil Kumar To: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, broonie@kernel.org Subject: [PATCH] ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure Date: Sun, 9 Nov 2014 18:15:14 +0530 Message-Id: <1415537114-9642-1-git-send-email-anilk4.v@gmail.com> X-Mailer: git-send-email 2.1.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141109_044634_468521_4136B36E X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -0.8 (/) Cc: davinci-linux-open-source@linux.davincidsp.com, tiwai@suse.de, perex@perex.cz, anilk4.v@gmail.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If probe fails then we need to call pm_runtime_disable() to balance out the previous pm_runtime_enable() call. Signed-off-by: Anil Kumar Acked-by: Peter Ujfalusi --- :100644 100644 0eed9b1... 99c747d... M sound/soc/davinci/davinci-mcasp.c sound/soc/davinci/davinci-mcasp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/davinci/davinci-mcasp.c b/sound/soc/davinci/davinci-mcasp.c index 0eed9b1..99c747d 100644 --- a/sound/soc/davinci/davinci-mcasp.c +++ b/sound/soc/davinci/davinci-mcasp.c @@ -1235,6 +1235,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev) ret = pm_runtime_get_sync(&pdev->dev); if (IS_ERR_VALUE(ret)) { dev_err(&pdev->dev, "pm_runtime_get_sync() failed\n"); + pm_runtime_disable(&pdev->dev); return ret; }