From mboxrd@z Thu Jan 1 00:00:00 1970 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=-7.0 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,UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham 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 ABA84C433DF for ; Fri, 19 Jun 2020 14:56:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7C313206F7 for ; Fri, 19 Jun 2020 14:56:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578561; bh=QEa7XrlnLLr3eBhKtiELVI4afInNDVlo/26zr5Hf8z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=nMFJWJibaNSI0YGZQ8xzZlQUM0tTe+WK1hVzyc7p8pRjqNlGU1cBmUFZvZ7niATJw Qv4vtCasnPKa/Pe/vtENOxWhkpRbWuqX/Kh/UgpZ/QgMni9dQjseky1ktV0wKI//nk ukbgzR88rR8JvD18o13q/9Yz192hU3EVwWC1De7U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390016AbgFSOz7 (ORCPT ); Fri, 19 Jun 2020 10:55:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:50644 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390000AbgFSOzo (ORCPT ); Fri, 19 Jun 2020 10:55:44 -0400 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 E8B8E2158C; Fri, 19 Jun 2020 14:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578544; bh=QEa7XrlnLLr3eBhKtiELVI4afInNDVlo/26zr5Hf8z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=1dcXWTrC+tgHGnXkcTiMu9BYM+AsGPjlrzRc3/rtEg0dmXpU8O4IWRjMGERfOzRY3 /cNxktcwTvIMgxIv6OTwa/J8u1CEAlCf3DIwTbGvv9tnlEi53vunXsiXWKoB0ZXWTX HXCzQjftVbOd3h9Mv2TGoaaixKTX8xHEdhNTQ+9I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Jarkko Nikula , Andy Shevchenko , Mark Brown , Sasha Levin Subject: [PATCH 4.19 063/267] spi: pxa2xx: Fix runtime PM ref imbalance on probe error Date: Fri, 19 Jun 2020 16:30:48 +0200 Message-Id: <20200619141651.902045265@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lukas Wunner [ Upstream commit 65e318e17358a3fd4fcb5a69d89b14016dee2f06 ] The PXA2xx SPI driver releases a runtime PM ref in the probe error path even though it hasn't acquired a ref earlier. Apparently commit e2b714afee32 ("spi: pxa2xx: Disable runtime PM if controller registration fails") sought to copy-paste the invocation of pm_runtime_disable() from pxa2xx_spi_remove(), but erroneously copied the call to pm_runtime_put_noidle() as well. Drop it. Fixes: e2b714afee32 ("spi: pxa2xx: Disable runtime PM if controller registration fails") Signed-off-by: Lukas Wunner Reviewed-by: Jarkko Nikula Reviewed-by: Andy Shevchenko Cc: stable@vger.kernel.org # v4.17+ Cc: Jarkko Nikula Link: https://lore.kernel.org/r/58b2ac6942ca1f91aaeeafe512144bc5343e1d84.1590408496.git.lukas@wunner.de Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-pxa2xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/spi/spi-pxa2xx.c b/drivers/spi/spi-pxa2xx.c index 6551188fea23..2525fd9c8aa4 100644 --- a/drivers/spi/spi-pxa2xx.c +++ b/drivers/spi/spi-pxa2xx.c @@ -1748,7 +1748,6 @@ static int pxa2xx_spi_probe(struct platform_device *pdev) return status; out_error_pm_runtime_enabled: - pm_runtime_put_noidle(&pdev->dev); pm_runtime_disable(&pdev->dev); out_error_clock_enabled: -- 2.25.1