From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 5AE78267B9B; Tue, 25 Mar 2025 12:31:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742905863; cv=none; b=c6vd9HKODpoWQynB9p7pUd6/2oBc16sPxQi8WfZWbjFbCf1vou9FwSs3cwJUSJzEd1sB2hKegZZd3RmpcUxn/ZeIJCeVtgnnCXW31/4OFeIKUuMiLpRFGgCDkaR8n8QRLQjMP18pCRAdrcBmP4O0w7ODLHdRT9ZWp1k2ZCudrf0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742905863; c=relaxed/simple; bh=RS2wfzojU4qmf6Bv/GCLQkI1jA1OK56yaKsW0iZfn5M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=dhOS8FNoA6eL0rUBO5kClm4vzY7poHSloDJ4W2NjNc6u/c7p62nH/VqPpXCEWzohyvsI3JOk9oRGenojcVn8+fb3DW8uZVvdcqaqXhwV4B2rYezuiOQ2dyrqYPovJijDyfAfG+R0Bmn1S6kqD1ijLJMcUlFGetc7zBZtoLiehN4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nchs7OHv; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nchs7OHv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EA2FC4CEE9; Tue, 25 Mar 2025 12:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1742905863; bh=RS2wfzojU4qmf6Bv/GCLQkI1jA1OK56yaKsW0iZfn5M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nchs7OHv+GdtY85nO0XP5ZrKPGYkpOjgSfvda/G10Hq9xb09ZJ8JYWEzq8lzQP15r j+TauSt8UVKOcadMURYOBkNWiXNjH8qt/SC9sCj12XZfIKSKB1SXtEVoFcXJNVODDE 6Ivya0eYdZsxpVh9o1rkANCFpOR9cLVBuERutFGw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Gu Bowen , Aubin Constans , Ulf Hansson Subject: [PATCH 6.1 177/198] mmc: atmel-mci: Add missing clk_disable_unprepare() Date: Tue, 25 Mar 2025 08:22:19 -0400 Message-ID: <20250325122201.291754711@linuxfoundation.org> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250325122156.633329074@linuxfoundation.org> References: <20250325122156.633329074@linuxfoundation.org> User-Agent: quilt/0.68 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: Gu Bowen commit e51a349d2dcf1df8422dabb90b2f691dc7df6f92 upstream. The error path when atmci_configure_dma() set dma fails in atmci driver does not correctly disable the clock. Add the missing clk_disable_unprepare() to the error path for pair with clk_prepare_enable(). Fixes: 467e081d23e6 ("mmc: atmel-mci: use probe deferring if dma controller is not ready yet") Signed-off-by: Gu Bowen Acked-by: Aubin Constans Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20250225022856.3452240-1-gubowen5@huawei.com Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/atmel-mci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -2506,8 +2506,10 @@ static int atmci_probe(struct platform_d /* Get MCI capabilities and set operations according to it */ atmci_get_cap(host); ret = atmci_configure_dma(host); - if (ret == -EPROBE_DEFER) + if (ret == -EPROBE_DEFER) { + clk_disable_unprepare(host->mck); goto err_dma_probe_defer; + } if (ret == 0) { host->prepare_data = &atmci_prepare_data_dma; host->submit_data = &atmci_submit_data_dma;