From nobody Mon Oct 6 08:26:52 2025 Received: from mx.socionext.com (mx.socionext.com [202.248.49.38]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 828B91F4606; Thu, 24 Jul 2025 04:22:20 +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=1753330942; cv=none; b=JDSXh6oC4IRJWeHyms9wA8NYgoJjaB6AtfMPuSxjcIvXpcI+X+y2X8jKMSuEA9h/tJnyxAL3rEbvCsSFC85BG8twFjHfAexDGQSgerutEPNdV4vE37wzUtNF/Gyz5050sZLmWjhr0MoorKYGLrYD/HqKFcgHXQqYVuGkoGa+pXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753330942; c=relaxed/simple; bh=5IrCmILlWgdEJmBSFnr+bsos6DiKAOP8575X+TpocYg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=jGz9ubBraw6sPR9X4PhGjoUJDQcOMmgECLDMyEsPZRiHBDa4+RAHfnQnsfCiybIEc0xuXtQ8KUgBz+JZjiQK8dIua643g+HAAtokQv6tJgKSGuSMQMXEt1uXSl6qpMgXP0WYLGJ6ga30zo8pnEdW1C2Po3oxlPxu6KzHkjBYFWE= 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 kinkan3-ex.css.socionext.com) ([172.31.9.52]) by mx.socionext.com with ESMTP; 24 Jul 2025 13:22:16 +0900 Received: from mail.mfilter.local (mail-arc02.css.socionext.com [10.213.46.40]) by kinkan3-ex.css.socionext.com (Postfix) with ESMTP id 95B742069FF1; Thu, 24 Jul 2025 13:22:16 +0900 (JST) Received: from kinkan3.css.socionext.com ([172.31.9.51]) by m-FILTER with ESMTP; Thu, 24 Jul 2025 13:22:16 +0900 Received: from plum.e01.socionext.com (unknown [10.212.245.39]) by kinkan3.css.socionext.com (Postfix) with ESMTP id 53B9B1C5A; Thu, 24 Jul 2025 13:22:16 +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 v2 2/2] i2c: designware: Add disabling clocks when probe fails Date: Thu, 24 Jul 2025 13:22:11 +0900 Message-Id: <20250724042211.2160339-3-hayashi.kunihiko@socionext.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250724042211.2160339-1-hayashi.kunihiko@socionext.com> References: <20250724042211.2160339-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 Acked-by: Jarkko Nikula --- 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