Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9098798pxu; Mon, 28 Dec 2020 06:36:34 -0800 (PST) X-Google-Smtp-Source: ABdhPJysTeGZ/0Z4qJjE3F+9XuM7qBn55QiawLGY3okDevlwK+6hBzW+2OxrtVrAVE0RHB+BYxc3 X-Received: by 2002:aa7:d3cc:: with SMTP id o12mr44283736edr.235.1609166194596; Mon, 28 Dec 2020 06:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609166194; cv=none; d=google.com; s=arc-20160816; b=E9iQ18uLTkVDCXGD+Y6zwPer7Wbjbs2Q34i8VfkAUnMERLpCnxFaQvXh1DERsZ0MZ/ ICv2THKODEl9bdjs0fLniqAp7B+//7J5yVby3/Upq+fJnbtHh1PujCKIub1doqCcxPBy 5EvWTXzYOK0CGi5xEFHhXd0PXFgipAZ4cxCN5JmCNx6DamwuAddazZ9h95Dn30AxNo5w savkynOx7UAxmkgrK68oIEx/UBgNlMcIRJ2tKXshjrAMU58E0DK1LbdtNxMcPxOdE1e6 Qv/XWfH/SHSGCYkXdO2VdeoAj4z4jaVnxIAq/kkVRjVPyFnutxivzT/LjHVgZT75zZs/ ZWLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=hW3BBQVF0zjJgflbyyy1COSC9AvkBrE2P81OW4D1ZWk=; b=cX22Nk+9lj2/EMVE5REhVFSOgCpaeOUFzJ+Y9ABQ7GIVtFuONIQkqV40ZkoNK/cilS pLWg/UmWLcbRRsLIyZzqgyFeIs0H1rNS4R7O7PYA68PPcX2MJVyPy0MRtJEOlGQZPMz2 wDX91NxISugMu8TLwdOTVpIaj6pQZN+DBI0zvSXiHYr0VfiJz1U7kjItyz0IjIt8ALMh o25UTDzCLyqAR4GxAp+07PdDr9C2SzvmOgkY1qmmk5wkVdOzzdElcV5Pq7Z4fXOV9GbT S568IGovsYX1Yn8St0fnlj7RkpZv+Qbg2GzfJxU7rgGa0wwBdAM6dzfP8DUqauaSP4A6 7Npg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TfJYcZlq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si20508092edy.12.2020.12.28.06.36.12; Mon, 28 Dec 2020 06:36:34 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TfJYcZlq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2504993AbgL1OdV (ORCPT + 99 others); Mon, 28 Dec 2020 09:33:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:38586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503707AbgL1Oad (ORCPT ); Mon, 28 Dec 2020 09:30:33 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 595A92245C; Mon, 28 Dec 2020 14:29:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609165792; bh=ypPykkwJtP8ZsDxyT0CKLagTG6mLj2WNPGAqoi8gbjM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TfJYcZlqUeA3cmGrY0+WeCOUXzfY6kTgJPjYGsRq8BLpzSFtGanp2d299l1CN2j9D Jkt29RmfdYoqKar5sCf8IacWwFuRB8cTmd0GIWSn7K9ORygbuczh6FBKwHLMblkjdE wFwxrygH6tIeEXWWJ9+5R75Cb7VQlJY4mn+9Jxb0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lukas Wunner , Chuhong Yuan , Mark Brown Subject: [PATCH 5.10 657/717] spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path Date: Mon, 28 Dec 2020 13:50:55 +0100 Message-Id: <20201228125052.431078975@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228125020.963311703@linuxfoundation.org> References: <20201228125020.963311703@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Lukas Wunner commit 5ef76dac0f2c26aeae4ee79eb830280f16d5aceb upstream. If the calls to devm_platform_ioremap_resource(), irq_of_parse_and_map() or devm_request_irq() fail on probe of the ST SSC4 SPI driver, the runtime PM disable depth is incremented even though it was not decremented before. Fix it. Fixes: cd050abeba2a ("spi: st-ssc4: add missed pm_runtime_disable") Signed-off-by: Lukas Wunner Cc: # v5.5+ Cc: Chuhong Yuan Link: https://lore.kernel.org/r/fbe8768c30dc829e2d77eabe7be062ca22f84024.1604874488.git.lukas@wunner.de Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-st-ssc4.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) --- a/drivers/spi/spi-st-ssc4.c +++ b/drivers/spi/spi-st-ssc4.c @@ -375,13 +375,14 @@ static int spi_st_probe(struct platform_ ret = devm_spi_register_master(&pdev->dev, master); if (ret) { dev_err(&pdev->dev, "Failed to register master\n"); - goto clk_disable; + goto rpm_disable; } return 0; -clk_disable: +rpm_disable: pm_runtime_disable(&pdev->dev); +clk_disable: clk_disable_unprepare(spi_st->clk); put_master: spi_master_put(master);