[PATCH 08/14] sti/hva: add missing clk_disable_unprepare()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixes this smatch warning:

drivers/media/platform/sti/hva/hva-hw.c:453 hva_hw_runtime_resume() warn: 'hva->clk' not released on lines: 450.

Call clk_disable_unprepare() when clk_set_rate() fails.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
Cc: Jean-Christophe Trotin <jean-christophe.trotin@xxxxxx>
---
 drivers/media/platform/sti/hva/hva-hw.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/media/platform/sti/hva/hva-hw.c b/drivers/media/platform/sti/hva/hva-hw.c
index 43f279e2a6a3..f59811e27f51 100644
--- a/drivers/media/platform/sti/hva/hva-hw.c
+++ b/drivers/media/platform/sti/hva/hva-hw.c
@@ -447,6 +447,7 @@ int hva_hw_runtime_resume(struct device *dev)
 	if (clk_set_rate(hva->clk, CLK_RATE)) {
 		dev_err(dev, "%s     failed to set clock frequency\n",
 			HVA_PREFIX);
+		clk_disable_unprepare(hva->clk);
 		return -EINVAL;
 	}
 
-- 
2.29.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux