From 0dfa73608f45918aa1c9a98c6d4c8b86382a4bc2 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 20 Jan 2021 09:47:20 +0100 Subject: [PATCH] media: sti/hva: add missing clk_disable_unprepare() 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 Cc: Jean-Christophe Trotin Signed-off-by: Mauro Carvalho Chehab --- 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; }