media: saa7146: Avoid using BUG_ON as an assertion
authorAditya Pakki <pakki001@umn.edu>
Sun, 15 Dec 2019 19:21:33 +0000 (20:21 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 8 Jan 2020 13:28:59 +0000 (14:28 +0100)
commit1ec4c6efe23154b4ab44c1a34dbc0eb121eb614a
tree237b4b082f45004df93692eea6a5718b20ab4f9f
parent93a24578de721006055b422c7772e0e417e1983c
media: saa7146: Avoid using BUG_ON as an assertion

In video_begin and video_end, saa7146_format_by_fourcc can return
NULL and is checked via BUG_ON. However, by returning the error
to the callers upstream, we can avoid the crash and handle it via
recovery code.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/common/saa7146/saa7146_video.c