mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 11:36:40 +07:00
[media] videobuf2: fix core to correctly identify allocation failures
The videobuf2-dma-contig allocator returns an ERR_PTR() on failure, not a NULL like all other allocators. Fix videobuf2-core to also correctly recognise those failures. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
0f890ab1b5
commit
62a79436a5
@ -51,7 +51,7 @@ static int __vb2_buf_mem_alloc(struct vb2_buffer *vb,
|
||||
for (plane = 0; plane < vb->num_planes; ++plane) {
|
||||
mem_priv = call_memop(q, plane, alloc, q->alloc_ctx[plane],
|
||||
plane_sizes[plane]);
|
||||
if (!mem_priv)
|
||||
if (IS_ERR_OR_NULL(mem_priv))
|
||||
goto free;
|
||||
|
||||
/* Associate allocator private data with this plane */
|
||||
|
Loading…
Reference in New Issue
Block a user