Skip to content
Commit 10791829 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] vb2: add WARN_ONs checking if a valid struct device was passed



The dma-contig and dma-sg memops require a valid struct device for
the DMA to be handled correctly.

Call WARN_ON and return ERR_PTR(-EINVAL) if it was NULL.

Setting the correct device pointer was forgotten in several new driver
submissions. This was caught during code review, but it really should be
caught in the code.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 0ff657b0
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment