diff options
author | Laurent Pinchart | 2013-11-04 00:28:24 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab | 2013-12-03 20:53:02 +0100 |
commit | 2b16b44a1c44814ed00cf750d20f3c404b5d4e48 (patch) | |
tree | 5564e4a7b13e81eb4aa2411755528b343fd05e7b /drivers/staging/media/omap4iss/iss_video.c | |
parent | [media] v4l: omap4iss: Don't initialize fields to 0 manually (diff) | |
download | kernel-qcow2-linux-2b16b44a1c44814ed00cf750d20f3c404b5d4e48.tar.gz kernel-qcow2-linux-2b16b44a1c44814ed00cf750d20f3c404b5d4e48.tar.xz kernel-qcow2-linux-2b16b44a1c44814ed00cf750d20f3c404b5d4e48.zip |
[media] v4l: omap4iss: Simplify error paths
Get rid of a goto statement for a simple error path that can be inlined,
and split spaghetti error code to a separate section.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/media/omap4iss/iss_video.c')
-rw-r--r-- | drivers/staging/media/omap4iss/iss_video.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/staging/media/omap4iss/iss_video.c b/drivers/staging/media/omap4iss/iss_video.c index ccbdecd0114c..a527330abc34 100644 --- a/drivers/staging/media/omap4iss/iss_video.c +++ b/drivers/staging/media/omap4iss/iss_video.c @@ -826,16 +826,17 @@ iss_video_streamon(struct file *file, void *fh, enum v4l2_buf_type type) spin_unlock_irqrestore(&video->qlock, flags); } - if (ret < 0) { + mutex_unlock(&video->stream_lock); + return 0; + err_omap4iss_set_stream: - vb2_streamoff(&vfh->queue, type); + vb2_streamoff(&vfh->queue, type); err_iss_video_check_format: - media_entity_pipeline_stop(&video->video.entity); + media_entity_pipeline_stop(&video->video.entity); err_media_entity_pipeline_start: - if (video->iss->pdata->set_constraints) - video->iss->pdata->set_constraints(video->iss, false); - video->queue = NULL; - } + if (video->iss->pdata->set_constraints) + video->iss->pdata->set_constraints(video->iss, false); + video->queue = NULL; mutex_unlock(&video->stream_lock); return ret; |