From a1385afa7be81030c9bf9e6ad8d45f6b4d5fcc5b Mon Sep 17 00:00:00 2001 From: Manish Poddar Date: Fri, 9 Oct 2015 16:26:50 +0530 Subject: [PATCH] msm: camera: Do stream deletion properly. when mediaserver crashes we are getting error that __msm_destroy_session_streams: Error: Destroyed list is not empty. The order of stream_id for normal camera close is 1,2,3,4,0.When mediaserver crashes stream id order is 0,1,2,3,4.stream id 4 is coming in the last and when pvdev->opened is 0 we are not deleting the stream.Added stream_delete when pvdev->opened is 0. Change-Id: I22eaa8bd485e19605b9b69e86644f68ce209e808 Signed-off-by: Manish Poddar --- drivers/media/platform/msm/camera_v2/camera/camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/msm/camera_v2/camera/camera.c b/drivers/media/platform/msm/camera_v2/camera/camera.c index e6ec08b58f7d..4454e89682e5 100644 --- a/drivers/media/platform/msm/camera_v2/camera/camera.c +++ b/drivers/media/platform/msm/camera_v2/camera/camera.c @@ -680,7 +680,7 @@ static int camera_v4l2_close(struct file *filep) msm_post_event(&event, MSM_POST_EVT_TIMEOUT); msm_delete_command_ack_q(pvdev->vdev->num, 0); - + msm_delete_stream(pvdev->vdev->num, sp->stream_id); mutex_unlock(&session->close_lock); /* This should take care of both normal close * and application crashes */