From patchwork Thu Jan 30 18:38:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 232329 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E3483C2D0DB for ; Thu, 30 Jan 2020 18:51:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BC35C205F4 for ; Thu, 30 Jan 2020 18:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580410274; bh=AJU6CtPh0acVabB7XyOq/MYQTgmrFRKeMffxV6gDCu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=fLmDCWhYNMUBjZlWc2+yXMmroMDcKzgAHOpmMsfwJK8Y/Ddd5rvVqlEIy6W7mOl9Y 4WVQGkpnQDQTgM5JXcmBKEqzNPB7Y3usYFo3wSMC707jIR1t7BWsqIrg6ifHuTBnqO wN44xw7Opx4WORU3qfLdycgFlBpuFZUzGazomEM0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731092AbgA3Spu (ORCPT ); Thu, 30 Jan 2020 13:45:50 -0500 Received: from mail.kernel.org ([198.145.29.99]:55566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728089AbgA3Spt (ORCPT ); Thu, 30 Jan 2020 13:45:49 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 55FD4205F4; Thu, 30 Jan 2020 18:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580409948; bh=AJU6CtPh0acVabB7XyOq/MYQTgmrFRKeMffxV6gDCu4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RstR3Y8XA5WSMMm2dvl2xPUmMeXnZDjV5o8nNO94/XQBjC9uJkyk/fpCHKxk8Irq6 vguFGmCC/HReSLXb4rF334VMDD8EGyLf1QQDSWa5+z05wXRZuEnk+YDlGcoD7wqY8L oYmcVTG176YmyITCzdx8RZ9xMbGfVVAsqVruJ7WI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chuhong Yuan , Nicolin Chen , Mark Brown , Sasha Levin Subject: [PATCH 5.4 056/110] ASoC: fsl_audmix: add missed pm_runtime_disable Date: Thu, 30 Jan 2020 19:38:32 +0100 Message-Id: <20200130183621.760869222@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200130183613.810054545@linuxfoundation.org> References: <20200130183613.810054545@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Chuhong Yuan [ Upstream commit 77fffa742285f2b587648d6c72b5c705633f146f ] The driver forgets to call pm_runtime_disable in probe failure and remove. Add the missed calls to fix it. Signed-off-by: Chuhong Yuan Acked-by: Nicolin Chen Link: https://lore.kernel.org/r/20191203111303.12933-1-hslester96@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/fsl/fsl_audmix.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sound/soc/fsl/fsl_audmix.c b/sound/soc/fsl/fsl_audmix.c index a1db1bce330fa..5faecbeb54970 100644 --- a/sound/soc/fsl/fsl_audmix.c +++ b/sound/soc/fsl/fsl_audmix.c @@ -505,15 +505,20 @@ static int fsl_audmix_probe(struct platform_device *pdev) ARRAY_SIZE(fsl_audmix_dai)); if (ret) { dev_err(dev, "failed to register ASoC DAI\n"); - return ret; + goto err_disable_pm; } priv->pdev = platform_device_register_data(dev, mdrv, 0, NULL, 0); if (IS_ERR(priv->pdev)) { ret = PTR_ERR(priv->pdev); dev_err(dev, "failed to register platform %s: %d\n", mdrv, ret); + goto err_disable_pm; } + return 0; + +err_disable_pm: + pm_runtime_disable(dev); return ret; } @@ -521,6 +526,8 @@ static int fsl_audmix_remove(struct platform_device *pdev) { struct fsl_audmix *priv = dev_get_drvdata(&pdev->dev); + pm_runtime_disable(&pdev->dev); + if (priv->pdev) platform_device_unregister(priv->pdev);