From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7528032B11D; Sat, 30 May 2026 17:04:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780160674; cv=none; b=cpFjXq+au3gyCiooOh7crh6TuUwebB9CVvBZ3q4FvjDCIu0Sk/0Lo+mdhME8c4IUXfGyLJ59Us7SjenNrd0Z42v6iyzOY7TzReSDtnN72wb2DygEGnVjuyf4Hli1qmYR7sH/0iEXoAi+D/Q5n2/UETUbQx4PsJ8COUPHsuiT0jo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780160674; c=relaxed/simple; bh=OmPvng3fiChG84t+hGCHU3CIksuu71us4lSXa/0cTJM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=JTwu/0DCDMYDwTktnYhjiT4NrBZdclSw88LDHrVUqCC1aAZP09xrZkfc51BvQPloCTCaljoTv59oDE8I5kSVopp5rUcxfTVpyAL+8iXKUZRwu+Yy9DNsJlpGjPwbnuTqlYRhpxgKTCt5ILmM5dCOitYEID918iKzE5XqWtpx5Tw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=pQHqBRBc; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="pQHqBRBc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BBE451F00898; Sat, 30 May 2026 17:04:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1780160673; bh=nx6rSuuksG7AcgLIe0DQYSqAxkmFD51Ri1QAcRfSb94=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=pQHqBRBc/K65UHClM+p8AsBgz1OcCy8l7uM2IM75YmsOphTSClaM2FjyUGn01rLxs JfAb9NKXv1zPWgxpUD253WTSbnDzQkc9i5T90iJq58RgQP0FfLhlQft4hnmg03Ys49 l/75jFJd+HTdb7bxLznMJC6srvCzZypXbwx6SZM8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Russell King , Johan Hovold , Mark Brown Subject: [PATCH 6.1 401/969] spi: orion: fix clock imbalance on registration failure Date: Sat, 30 May 2026 17:58:45 +0200 Message-ID: <20260530160311.362573604@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260530160300.485627683@linuxfoundation.org> References: <20260530160300.485627683@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Johan Hovold commit 443cde0dc59c5d154156ac9f27a7dadef8ebc0c2 upstream. Make sure that the controller is not runtime suspended before disabling clocks on probe failure. Also restore the autosuspend setting. Fixes: 5c6786945b4e ("spi: spi-orion: add runtime PM support") Cc: stable@vger.kernel.org # 3.17 Cc: Russell King Signed-off-by: Johan Hovold Link: https://patch.msgid.link/20260421130211.1537628-3-johan@kernel.org Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- drivers/spi/spi-orion.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/spi/spi-orion.c +++ b/drivers/spi/spi-orion.c @@ -780,6 +780,7 @@ static int orion_spi_probe(struct platfo pm_runtime_set_active(&pdev->dev); pm_runtime_use_autosuspend(&pdev->dev); pm_runtime_set_autosuspend_delay(&pdev->dev, SPI_AUTOSUSPEND_TIMEOUT); + pm_runtime_get_noresume(&pdev->dev); pm_runtime_enable(&pdev->dev); status = orion_spi_reset(spi); @@ -791,10 +792,15 @@ static int orion_spi_probe(struct platfo if (status < 0) goto out_rel_pm; + pm_runtime_put_autosuspend(&pdev->dev); + return status; out_rel_pm: pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + pm_runtime_set_suspended(&pdev->dev); + pm_runtime_dont_use_autosuspend(&pdev->dev); out_rel_axi_clk: clk_disable_unprepare(spi->axi_clk); out_rel_clk: