diff --git a/drivers/i2c/busses/i2c-st.c b/drivers/i2c/busses/i2c-st.c
index 751ea421caaf..2049bbce3656 100644
--- a/drivers/i2c/busses/i2c-st.c
+++ b/drivers/i2c/busses/i2c-st.c
@@ -831,7 +831,7 @@ static int st_i2c_probe(struct platform_device *pdev)
 			IRQF_ONESHOT, pdev->name, i2c_dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq);
-		return ret;
+		goto err_clk;
 	}
 
 	pinctrl_pm_select_default_state(i2c_dev->dev);
@@ -840,7 +840,7 @@ static int st_i2c_probe(struct platform_device *pdev)
 
 	ret = st_i2c_of_get_deglitch(np, i2c_dev);
 	if (ret)
-		return ret;
+		goto err_clk;
 
 	adap = &i2c_dev->adap;
 	i2c_set_adapdata(adap, i2c_dev);
@@ -857,13 +857,17 @@ static int st_i2c_probe(struct platform_device *pdev)
 
 	ret = i2c_add_adapter(adap);
 	if (ret)
-		return ret;
+		goto err_clk;
 
 	platform_set_drvdata(pdev, i2c_dev);
 
 	dev_info(i2c_dev->dev, "%s initialized\n", adap->name);
 
 	return 0;
+
+err_clk:
+	clk_put(i2c_dev->clk);
+	return ret;
 }
 
 static void st_i2c_remove(struct platform_device *pdev)
@@ -871,6 +875,7 @@ static void st_i2c_remove(struct platform_device *pdev)
 	struct st_i2c_dev *i2c_dev = platform_get_drvdata(pdev);
 
 	i2c_del_adapter(&i2c_dev->adap);
+	clk_put(i2c_dev->clk);
 }
 
 static const struct of_device_id st_i2c_match[] = {
