Message ID | 20210120094306.784318-9-hverkuil-cisco@xs4all.nl |
---|---|
State | Accepted |
Commit | 0dfa73608f45918aa1c9a98c6d4c8b86382a4bc2 |
Headers | show |
Series | Fixes for smatch/sparse/sysbot/compiler warnings | expand |
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; }
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@xs4all.nl> Cc: Jean-Christophe Trotin <jean-christophe.trotin@st.com> --- drivers/media/platform/sti/hva/hva-hw.c | 1 + 1 file changed, 1 insertion(+)