Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e5ae8fa7 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] vb2: don't free alloc context if it is ERR_PTR



Don't try to free a pointer containing an ERR_PTR().

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarPawel Osciak <pawel@osciak.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent d935c57e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -854,6 +854,7 @@ EXPORT_SYMBOL_GPL(vb2_dma_contig_init_ctx);

void vb2_dma_contig_cleanup_ctx(void *alloc_ctx)
{
	if (!IS_ERR_OR_NULL(alloc_ctx))
		kfree(alloc_ctx);
}
EXPORT_SYMBOL_GPL(vb2_dma_contig_cleanup_ctx);