OSDN Git Service

media: cx231xx: replace BUG_ON with recovery code
authorAditya Pakki <pakki001@umn.edu>
Sun, 15 Dec 2019 19:08:04 +0000 (20:08 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 8 Jan 2020 13:27:51 +0000 (14:27 +0100)
commit93a24578de721006055b422c7772e0e417e1983c
tree07a85ff8f556a2e70150c6fa66d2552b29169c42
parent3a909680950b4b43df3bb5cd33fc4a3009d75369
media: cx231xx: replace BUG_ON with recovery code

In cx231xx_i2c_register, if dev->cx231xx_send_usb_command is NULL,
the code crashes. However, the callers in cx231xx-core are able to
handle the error without crashing. This patch fixes this issue.

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/usb/cx231xx/cx231xx-i2c.c