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: 5260431 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 3CD0C9F2ED for ; Sun, 9 Nov 2014 12:46:36 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7BBEE2015D for ; Sun, 9 Nov 2014 12:46:35 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 4BA0A2012D for ; Sun, 9 Nov 2014 12:46:34 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 731CF260529; Sun, 9 Nov 2014 13:46:33 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 84A292604E6; Sun, 9 Nov 2014 13:46:22 +0100 (CET) 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 1BFC42604F8; Sun, 9 Nov 2014 13:46:21 +0100 (CET) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by alsa0.perex.cz (Postfix) with ESMTP id 053B42604E2 for ; Sun, 9 Nov 2014 13:46:13 +0100 (CET) Received: by mail-pd0-f172.google.com with SMTP id r10so6148775pdi.3 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 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 Cc: davinci-linux-open-source@linux.davincidsp.com, tiwai@suse.de, peter.ujfalusi@ti.com, anilk4.v@gmail.com, linux-arm-kernel@lists.infradead.org Subject: [alsa-devel] [PATCH] ASoC: davinvi-mcasp: Balance pm_runtime_enable() on probe failure 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 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; }