Commit 09b8746f authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman

media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()

[ Upstream commit 43d0d3c5 ]

Add the missing clk_disable_unprepare() before return from
jpu_open() in the software reset error handling case.
Signed-off-by: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarMikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Reviewed-by: default avatarKieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: default avatarHans Verkuil <hansverk@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7a9a331f
...@@ -1278,7 +1278,7 @@ static int jpu_open(struct file *file) ...@@ -1278,7 +1278,7 @@ static int jpu_open(struct file *file)
/* ...issue software reset */ /* ...issue software reset */
ret = jpu_reset(jpu); ret = jpu_reset(jpu);
if (ret) if (ret)
goto device_prepare_rollback; goto jpu_reset_rollback;
} }
jpu->ref_count++; jpu->ref_count++;
...@@ -1286,6 +1286,8 @@ static int jpu_open(struct file *file) ...@@ -1286,6 +1286,8 @@ static int jpu_open(struct file *file)
mutex_unlock(&jpu->mutex); mutex_unlock(&jpu->mutex);
return 0; return 0;
jpu_reset_rollback:
clk_disable_unprepare(jpu->clk);
device_prepare_rollback: device_prepare_rollback:
mutex_unlock(&jpu->mutex); mutex_unlock(&jpu->mutex);
v4l_prepare_rollback: v4l_prepare_rollback:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment