mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
media: rcar_jpu: Add missing clk_disable_unprepare() on error in jpu_open()
[ Upstream commit 43d0d3c527 ]
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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
240bc678f7
commit
adf9ceabfc
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user