Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp9168994pxu; Mon, 28 Dec 2020 08:17:18 -0800 (PST) X-Google-Smtp-Source: ABdhPJy5C9R9KBCVtNh1Dl2Doka7lUjv7cevrc6lqz33b+DcQ1abnFC+4LwiMyUpjSPKY35znLEg X-Received: by 2002:aa7:c1c6:: with SMTP id d6mr42885123edp.275.1609172238733; Mon, 28 Dec 2020 08:17:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1609172238; cv=none; d=google.com; s=arc-20160816; b=0R4GqZL7GmLmhQxpvCEhyv9KPJtMKGamK5zGqOJiZy8Gs1IL3lYKXY3/LW5qI7tXBX nldFGn11+MYOXb0HPK7IuIvQn5fZcWr/z/TJ7G4D4yIIOiHQMCdaged/3JRmvSDFv8Xf mD+BQbQFzO5vrJgiU1+hX/gKToQauYreRhIGujB27Ga+b84Z9f0gVvkV2vQDMWmPbqel AvrrVRF69hMAKPYWrQzM3mqenG4rP+3Spzp4Mia/khSn82Vrowx+Du23GiYxgVHcl/HO J1Y84Rr/bfmOyRXtDR3PPLVZGFUI7nkdYBZ1Bg43nwGis19Y95pIXuvv4fJv4W7ZLXvc KC/w== 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=VpF/yfl+Hw91Rijd4vNE4jEYdAZ+JbeW+jXHC1c4vXy6YFQo5H5bBcOQQbZVUKowB1 meadtn3gcf6DIXkehlK7T8M0ZPGLVvBv3qCUSHwaNFOAxg4jfwj/khtq8df+/U9zRMKA eC0ta3uHeHPv+lIhHXHBL3bw81Pwq9VJ8TjrV4eEiCQWaltB2eM1XQnVoDvqIO92GYUx t2pN3uuBlT04MQHuZ58gcUqTHyuuG+pu0qDr5XExBc8aR/t+lw2PvInevGYdxY/ZoqvJ 4yAfCgOsTrWhgFmxA1C7FQwL6ZKbh7gThu5Ws2r9vywpFE09ou2gYhW7n1CNObtK2GZ9 LI0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dBqvTeg9; 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 rv19si4618100ejb.262.2020.12.28.08.16.55; Mon, 28 Dec 2020 08:17:18 -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=dBqvTeg9; 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 S2394278AbgL1QOt (ORCPT + 99 others); Mon, 28 Dec 2020 11:14:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:47142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731771AbgL1NSg (ORCPT ); Mon, 28 Dec 2020 08:18:36 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 54005207C9; Mon, 28 Dec 2020 13:17:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1609161476; bh=3fNXPCLn+df4fHPGcmz0dIT0FYWo1Wbk35m/GDVDrW0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dBqvTeg9eHhbzgKxf91WUlzTEXs1UOFOA7bgV6aakC/O9HckYvpu67QCPrGd4gm/k zfXv23b8fhuNfSu0SPLoRDxNmHy459quY8GS1YlZG+bPzZ9V68o5sV8x7pQhYg9xtC oj9s8mCNunQb3+2DIreqHoGetS9Qt6YkKI/wxiN8= 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.14 225/242] spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path Date: Mon, 28 Dec 2020 13:50:30 +0100 Message-Id: <20201228124915.753072800@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201228124904.654293249@linuxfoundation.org> References: <20201228124904.654293249@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);