diff options
author | Wei Yongjun | 2016-07-12 07:21:46 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab | 2018-05-11 11:23:54 -0400 |
commit | 43d0d3c52787df0221d1c52494daabd824fe84f1 (patch) | |
tree | 4c4435b3c369c94d5c2f98653174d4589b7cef07 /drivers/media/platform/rcar_jpu.c | |
parent | 5377f3c3312e14b6f664b2db80ab3915e247ab28 (diff) |
media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()
Add the missing clk_disable_unprepare() before return from
jpu_open() in the software reset error handling case.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hansverk@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/platform/rcar_jpu.c')
-rw-r--r-- | drivers/media/platform/rcar_jpu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/rcar_jpu.c b/drivers/media/platform/rcar_jpu.c index f6092ae45912..8b44a849ab41 100644 --- a/drivers/media/platform/rcar_jpu.c +++ b/drivers/media/platform/rcar_jpu.c @@ -1280,7 +1280,7 @@ static int jpu_open(struct file *file) /* ...issue software reset */ ret = jpu_reset(jpu); if (ret) - goto device_prepare_rollback; + goto jpu_reset_rollback; } jpu->ref_count++; @@ -1288,6 +1288,8 @@ static int jpu_open(struct file *file) mutex_unlock(&jpu->mutex); return 0; +jpu_reset_rollback: + clk_disable_unprepare(jpu->clk); device_prepare_rollback: mutex_unlock(&jpu->mutex); v4l_prepare_rollback: |