mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
media: rockchip: isp1: fix crash issue
vb2_fop_release should be called before v4l2_pipeline_pm_use, otherwise it causes system crash when start stream with v4l2-ctl command, and stop stream unexpected with ctrl+c. Change-Id: Ia46078aaf1e436fdc10272ef778b4d8b11589520 Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
This commit is contained in:
committed by
Tao Huang
parent
72a11f11d8
commit
9f37bae407
@@ -1757,10 +1757,14 @@ int rkisp1_fop_release(struct file *file)
|
||||
struct rkisp1_device *dev = stream->ispdev;
|
||||
int ret;
|
||||
|
||||
ret = v4l2_pipeline_pm_use(&stream->vnode.vdev.entity, 0);
|
||||
ret |= vb2_fop_release(file);
|
||||
atomic_dec(&dev->open_cnt);
|
||||
|
||||
ret = vb2_fop_release(file);
|
||||
if (!ret) {
|
||||
ret = v4l2_pipeline_pm_use(&stream->vnode.vdev.entity, 0);
|
||||
if (ret < 0)
|
||||
v4l2_err(&dev->v4l2_dev,
|
||||
"set pipeline power failed %d\n", ret);
|
||||
atomic_dec(&dev->open_cnt);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user