Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9181585pxu; Mon, 28 Dec 2020 08:36:35 -0800 (PST) X-Google-Smtp-Source: ABdhPJyz5fWwytbJR3Vvq5e2GMkw21Vf9/229PuxP79phjxM/DIBkYMcdPBhK1KOgrEoueTTepzn X-Received: by 2002:a17:906:6b88:: with SMTP id l8mr42240879ejr.482.1609173394936; Mon, 28 Dec 2020 08:36:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609173394; cv=none; d=google.com; s=arc-20160816; b=EfBdQj+e8W+Aq3G4/VTq+mEi0e0ltpbtU4ZnAyKYrD0Tn/LW2cetQz3JKiPAk4phsl kl24O0A90XguD7i1iHGeWOSF0XDFkoNDjDPSyWc5CZkbU8sfxaqTTlbEcBR5l0nlrqKl Y/3Jcrhffsi5NfNTmccjClyo1O+urG7bWfr882QYu/Xz4Tri0M8Hr54cP7SfC5MI0L8K Ylp+qUsfm2GUvemML18iXA/GXZaZMaijzt0K5qtZyvB4RvPNybNyxFSsInna2OwHBKRj SDSfg0ETK2C1j5TNq/11JMUoAwtOOd41da+V60BDOfQJAT2GnG0G+6EeNJhR3czVkotz 5nOg== 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=HO01T4tIWhOGgliRDp7I8XrWdSeot2ndehcF93NStMo=; b=YF1YnVzYKyZIGV8cHv/9l3uITep1ZcBrrWzZ+vBtLJa55oGvOjjkqgrYDHtoYgzeX9 mYRUKTwPTBSQO7tVmMdGJNCMBKKB04AQ15RNbvPbcEuRjproPNhl8r0E0+vcU77ghBSv nce31+91m/hq43AskbUVj8cP0sV1WozL6SoKdXdYWNq+7s9nftj4O0Ofem57kCIankKC tUvQMMaQS2iLU9HzbMl4/SyCoaf95XtoS4faA3Dt6NZT8QDEF9+ZjWvT3fMrNozFwXbU eMqDaFCqClSfqx2KAHtQ5GJcquQBmnW1xn8Gbffz2cS3l7GV8bQPNo+YkxSZHB/zlDWZ cD6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=FbDTCRQE; 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 f26si18107528ejd.704.2020.12.28.08.36.10; Mon, 28 Dec 2020 08: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=FbDTCRQE; 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 S2441824AbgL1QaD (ORCPT + 99 others); Mon, 28 Dec 2020 11:30:03 -0500 Received: from mail.kernel.org ([198.145.29.99]:34638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730211AbgL1NGz (ORCPT ); Mon, 28 Dec 2020 08:06:55 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id E05B222AAA; Mon, 28 Dec 2020 13:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609160774; bh=3fNXPCLn+df4fHPGcmz0dIT0FYWo1Wbk35m/GDVDrW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FbDTCRQE9jNxjaFmlcdYZIlv7n9ueXtI5OR1+DENBCx8R8KpkJhV1KFgQJIkXJbtS jVM1b4yCQqyB9fm1Aw0BilCfOTnuVrV1uwc3wCu7BB8PORJmaSiApjRhzyo7qzBjqa gi2WJP9wAzUmTAqnGqt6IPbkyHB5VqiEnDT9EFDs= 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 4.9 167/175] spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path Date: Mon, 28 Dec 2020 13:50:20 +0100 Message-Id: <20201228124901.328039469@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124853.216621466@linuxfoundation.org> References: <20201228124853.216621466@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 @@ -379,13 +379,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);