diff options
author | Helen Koike <helen.koike@collabora.com> | 2020-03-16 22:00:43 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-04-21 17:01:30 +0200 |
commit | 60e915354c27035717d95af4465cfa1b42b9240a (patch) | |
tree | b888abcc3012eb51655995426d5474c3b801f026 /drivers/staging/media/rkisp1 | |
parent | b2b1046f1de6263e6281d46fd376ee048f09d013 (diff) | |
download | linux-60e915354c27035717d95af4465cfa1b42b9240a.tar.bz2 |
media: staging: rkisp1: cap: fix return values from pm functions
If no errors occurs, pm functions return usage counters, so they can
return positive numbers.
This happens when streaming from multiple capture devices (mainpath and
selfpath).
Fix simultaneous streaming from mainpath and selfpath by not failing
when pm usage counters returns a positive number.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/staging/media/rkisp1')
-rw-r--r-- | drivers/staging/media/rkisp1/rkisp1-capture.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/media/rkisp1/rkisp1-capture.c b/drivers/staging/media/rkisp1/rkisp1-capture.c index 7e3d498d0b4f..b371bbd70d63 100644 --- a/drivers/staging/media/rkisp1/rkisp1-capture.c +++ b/drivers/staging/media/rkisp1/rkisp1-capture.c @@ -892,7 +892,7 @@ static void rkisp1_vb2_stop_streaming(struct vb2_queue *queue) v4l2_pipeline_pm_put(&node->vdev.entity); ret = pm_runtime_put(rkisp1->dev); - if (ret) + if (ret < 0) dev_err(rkisp1->dev, "power down failed error:%d\n", ret); rkisp1_dummy_buf_destroy(cap); @@ -945,7 +945,7 @@ rkisp1_vb2_start_streaming(struct vb2_queue *queue, unsigned int count) goto err_ret_buffers; ret = pm_runtime_get_sync(cap->rkisp1->dev); - if (ret) { + if (ret < 0) { dev_err(cap->rkisp1->dev, "power up failed %d\n", ret); goto err_destroy_dummy; } |