summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-05-13 04:48:45 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-05-27 11:51:36 (GMT)
commit5dd6946c419a3a553842115665e142d1245fb837 (patch)
tree74448c739e0abd2429147fbfa41248548d705e99 /drivers
parent99119595d9ff06f74d97d3623fd8a63138f9b287 (diff)
downloadlinux-fsl-qoriq-5dd6946c419a3a553842115665e142d1245fb837.tar.xz
[media] v4l: vb2: fix error return code in __vb2_init_fileio()
Fix to return -EINVAL in the get kernel address error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/v4l2-core/videobuf2-core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 7d833ee..7bd3ee6 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2193,8 +2193,10 @@ static int __vb2_init_fileio(struct vb2_queue *q, int read)
*/
for (i = 0; i < q->num_buffers; i++) {
fileio->bufs[i].vaddr = vb2_plane_vaddr(q->bufs[i], 0);
- if (fileio->bufs[i].vaddr == NULL)
+ if (fileio->bufs[i].vaddr == NULL) {
+ ret = -EINVAL;
goto err_reqbufs;
+ }
fileio->bufs[i].size = vb2_plane_size(q->bufs[i], 0);
}