diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2013-11-03 20:28:24 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-12-03 17:53:02 -0200 |
commit | 2b16b44a1c44814ed00cf750d20f3c404b5d4e48 (patch) | |
tree | 5564e4a7b13e81eb4aa2411755528b343fd05e7b /drivers/staging/media/omap4iss/iss_video.c | |
parent | 245d6b2d505b0575b34e5c02b694bf2e476904b4 (diff) |
[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; |