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 CC93924CEEA; Sat, 12 Sep 2026 11:04:58 +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=1789211099; cv=none; b=sTgkn1Z9BMoGADz6LmXljx9zwLwTFCn6/PDRKBcXUvcoZ5PxIAhMDl74rHEQke7+k7nEsL3N9giZBY42mDUAeRh9S6U7bqMgoo0aQs1dxu5Q8Rsw4R5xnu1WpVTjqmOVqpaTRAI0ghsDYRKkT2Mzdwyx7ka+prUtTbssqGcB3cg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789211099; c=relaxed/simple; bh=cPQnvQvG9BGRNkv0b+yf+xFKhm5DRltPA1/VCr6SPio=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=jBYVeINf0nZIW3AX2nV/89Tp3v2ZK2LSaE+DuNLFbJtm+hT7LZWsoufoIy4hNFtxkHAzaWR4LdmPDn8P6hk3VG1TzChujstaPdBUn1Dbe1SGzWcdfyg33ODfyLOLELX+1gGqG0nma59NRRDmlxMXSLaaRgcCICgWOJPHBYVjybQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Ol6jjGEw; 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="Ol6jjGEw" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 843671F000FF; Sat, 12 Sep 2026 11:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789211098; bh=txC+hRIZL3s4Ggo2WagRfa9vivCspHP050danVPHBcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Ol6jjGEwdHs6LlqYcbFUbFK/UkDHvIQFASgRufkicsMRIqMiI/WDgx5YnXREUtu9z EStXKxchbb8K72PtAQqWBV2mdb7RRCnn0iD/OSi3QDUa/Yct2DLcdUPZ9Nsr4PXt0E mtXN69TBPLepwENx2bt3nPnDZ7/RKYxDY+oIpfSg= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Felix Gu , Mark Brown , Sasha Levin Subject: [PATCH 6.18 1162/1518] spi: img-spfi: dont disable runtime PM on DMA deferred probe Date: Sat, 12 Sep 2026 08:55:31 +0200 Message-ID: <20260912065649.744536161@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065623.398859879@linuxfoundation.org> References: <20260912065623.398859879@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.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Felix Gu [ Upstream commit 923e41ed59511cffe98357c7d58d0294a1c157ee ] When dma_request_chan() returns -EPROBE_DEFER, the error path jumps to disable_pm and calls pm_runtime_disable() even though pm_runtime_enable() was never called, leaving disable_depth unbalanced and the device permanently PM-disabled. Route the defer path through free_dma to skip pm_runtime_disable(). Fixes: 6bfbf4d0aa0c ("spi: img-spfi: Use dma_request_chan() instead dma_request_slave_channel()") Signed-off-by: Felix Gu Link: https://patch.msgid.link/20260808-spfi-v1-1-6bc4345be430@gmail.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi-img-spfi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/spi/spi-img-spfi.c b/drivers/spi/spi-img-spfi.c index a6d15b9ca5098..4f3683a07555e 100644 --- a/drivers/spi/spi-img-spfi.c +++ b/drivers/spi/spi-img-spfi.c @@ -616,7 +616,7 @@ static int img_spfi_probe(struct platform_device *pdev) ret = PTR_ERR(spfi->tx_ch); spfi->tx_ch = NULL; if (ret == -EPROBE_DEFER) - goto disable_pm; + goto free_dma; } spfi->rx_ch = dma_request_chan(spfi->dev, "rx"); @@ -624,7 +624,7 @@ static int img_spfi_probe(struct platform_device *pdev) ret = PTR_ERR(spfi->rx_ch); spfi->rx_ch = NULL; if (ret == -EPROBE_DEFER) - goto disable_pm; + goto free_dma; } if (!spfi->tx_ch || !spfi->rx_ch) { @@ -652,6 +652,7 @@ static int img_spfi_probe(struct platform_device *pdev) disable_pm: pm_runtime_disable(spfi->dev); +free_dma: if (spfi->rx_ch) dma_release_channel(spfi->rx_ch); if (spfi->tx_ch) -- 2.53.0