Skip to content
Commit 1a065ee3 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: v4l2-core: Remove BUG() from i2c and spi helpers



Currently, the i2c and spi subdev creation helpers
are calling BUG() when passed a NULL v4l2_device parameter.

This makes little sense; simply returning NULL seems more
sensible.

These two helpers may already return NULL on error, so callers
should already be checking for this, or at least be prepared
for a NULL result.

Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 51ff392c
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