From nobody Mon Oct 6 08:26:57 2025 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 478061A0BD6; Thu, 24 Jul 2025 02:14:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.248.49.38 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753323289; cv=none; b=l/nE48NrXGYqAX+7wUXXNWPpU4TScK1F6bOGA4wiX31u75N5FbYwiZB3u6KeRUZlD0yWdSzf6SmL1nOF7boXYte+6rmFQd0q1WpOAAbbdwo0khiaiMTieIgg8IzRefcdgvxwdeHDWzH/IjBVcvOi8a1o12AJgrnq1lywkDbG7Wc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753323289; c=relaxed/simple; bh=5IrCmILlWgdEJmBSFnr+bsos6DiKAOP8575X+TpocYg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=iAx9nRKW4MBmP+oAi9mVK+H0DAoHKf3HiiTjbWqUmH34Z8JNZPRd5biF0ynrLM8DHWhGHH5uSrKR/2N0ECYRh0iko/GtXmd6ZmRJ15qtvo67qDIF+qisBAEpkKlOzyWO8yDcC3hZB6dBlQJEWTpmpm+TD/YFaiemv4aejLnm5J8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com; spf=pass smtp.mailfrom=socionext.com; arc=none smtp.client-ip=202.248.49.38 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=socionext.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=socionext.com Received: from unknown (HELO iyokan3-ex.css.socionext.com) ([172.31.9.54]) by mx.socionext.com with ESMTP; 24 Jul 2025 11:13:36 +0900 Received: from mail.mfilter.local (mail-arc01.css.socionext.com [10.213.46.36]) by iyokan3-ex.css.socionext.com (Postfix) with ESMTP id 56BD92091485; Thu, 24 Jul 2025 11:13:36 +0900 (JST) Received: from kinkan3.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Thu, 24 Jul 2025 11:13:36 +0900 Received: from plum.e01.socionext.com (unknown [10.212.245.39]) by kinkan3.css.socionext.com (Postfix) with ESMTP id 571C01C5A; Thu, 24 Jul 2025 11:13:35 +0900 (JST) From: Kunihiko Hayashi To: Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti Cc: Kohei Ito , linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, Kunihiko Hayashi Subject: [PATCH 2/2] i2c: designware: Add disabling clocks when probe fails Date: Thu, 24 Jul 2025 11:13:17 +0900 Message-Id: <20250724021317.2116943-3-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250724021317.2116943-1-hayashi.kunihiko@socionext.com> References: <20250724021317.2116943-1-hayashi.kunihiko@socionext.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" After an error occurs during probing state, dw_i2c_plat_pm_cleanup() is called. However, this function doesn't disable clocks and the clock-enable count keeps increasing. Should disable these clocks explicitly. Co-developed-by: Kohei Ito Signed-off-by: Kohei Ito Signed-off-by: Kunihiko Hayashi --- drivers/i2c/busses/i2c-designware-platdrv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/buss= es/i2c-designware-platdrv.c index edaebfb165f9..f6424dcfdff6 100644 --- a/drivers/i2c/busses/i2c-designware-platdrv.c +++ b/drivers/i2c/busses/i2c-designware-platdrv.c @@ -308,6 +308,7 @@ static int dw_i2c_plat_probe(struct platform_device *pd= ev) =20 exit_probe: dw_i2c_plat_pm_cleanup(dev); + i2c_dw_prepare_clk(dev, false); exit_reset: reset_control_assert(dev->rst); return ret; --=20 2.34.1