media: pci: cx23885: check cx23885_vdev_init() return
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 19 Oct 2023 06:58:49 +0000 (08:58 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 5 Feb 2024 11:57:44 +0000 (12:57 +0100)
commit15126b916e39b0cb67026b0af3c014bfeb1f76b3
tree1e5f1e580c301124aa3aa80ac7a50b44111e54bd
parent35546945e5e5cce825d2b92e1ecc3f4ac70ec1dc
media: pci: cx23885: check cx23885_vdev_init() return

cx23885_vdev_init() can return a NULL pointer, but that pointer
is used in the next line without a check.

Add a NULL pointer check and go to the error unwind if it is NULL.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reported-by: Sicong Huang <huangsicong@iie.ac.cn>
drivers/media/pci/cx23885/cx23885-video.c