diff options
Diffstat (limited to 'drivers/media/video/s5p-fimc')
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-capture.c | 2 | ||||
-rw-r--r-- | drivers/media/video/s5p-fimc/fimc-mdevice.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/s5p-fimc/fimc-capture.c b/drivers/media/video/s5p-fimc/fimc-capture.c index 354574591908..7083107c2b37 100644 --- a/drivers/media/video/s5p-fimc/fimc-capture.c +++ b/drivers/media/video/s5p-fimc/fimc-capture.c | |||
@@ -499,10 +499,10 @@ static int fimc_capture_open(struct file *file) | |||
499 | if (ret < 0) { | 499 | if (ret < 0) { |
500 | dev_err(&fimc->pdev->dev, | 500 | dev_err(&fimc->pdev->dev, |
501 | "Video pipeline initialization failed\n"); | 501 | "Video pipeline initialization failed\n"); |
502 | clear_bit(ST_CAPT_BUSY, &fimc->state); | ||
502 | pm_runtime_put_sync(&fimc->pdev->dev); | 503 | pm_runtime_put_sync(&fimc->pdev->dev); |
503 | fimc->vid_cap.refcnt--; | 504 | fimc->vid_cap.refcnt--; |
504 | v4l2_fh_release(file); | 505 | v4l2_fh_release(file); |
505 | clear_bit(ST_CAPT_BUSY, &fimc->state); | ||
506 | return ret; | 506 | return ret; |
507 | } | 507 | } |
508 | ret = fimc_capture_ctrls_create(fimc); | 508 | ret = fimc_capture_ctrls_create(fimc); |
diff --git a/drivers/media/video/s5p-fimc/fimc-mdevice.c b/drivers/media/video/s5p-fimc/fimc-mdevice.c index 6753c45631b8..7450dcdafc87 100644 --- a/drivers/media/video/s5p-fimc/fimc-mdevice.c +++ b/drivers/media/video/s5p-fimc/fimc-mdevice.c | |||
@@ -193,9 +193,13 @@ int __fimc_pipeline_shutdown(struct fimc_pipeline *p) | |||
193 | 193 | ||
194 | int fimc_pipeline_shutdown(struct fimc_pipeline *p) | 194 | int fimc_pipeline_shutdown(struct fimc_pipeline *p) |
195 | { | 195 | { |
196 | struct media_entity *me = &p->subdevs[IDX_SENSOR]->entity; | 196 | struct media_entity *me; |
197 | int ret; | 197 | int ret; |
198 | 198 | ||
199 | if (!p || !p->subdevs[IDX_SENSOR]) | ||
200 | return -EINVAL; | ||
201 | |||
202 | me = &p->subdevs[IDX_SENSOR]->entity; | ||
199 | mutex_lock(&me->parent->graph_mutex); | 203 | mutex_lock(&me->parent->graph_mutex); |
200 | ret = __fimc_pipeline_shutdown(p); | 204 | ret = __fimc_pipeline_shutdown(p); |
201 | mutex_unlock(&me->parent->graph_mutex); | 205 | mutex_unlock(&me->parent->graph_mutex); |