media: pci: cx18: if cx == NULL, then don't use it.
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 13 Oct 2023 07:43:55 +0000 (09:43 +0200)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Fri, 13 Oct 2023 09:33:22 +0000 (11:33 +0200)
commitbe521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6
treebacabddf4ed5b69f4c3b826205680aeae579b394
parent65b8c8cb2bf5f5676b5f0628a455c2982aa09683
media: pci: cx18: if cx == NULL, then don't use it.

If the cx NULL pointer check is true, then it reports
an error with CX18_ERR, but that uses cx. Replace it with
pr_err.

Reported by smatch:

drivers/media/pci/cx18/cx18-mailbox.c:834 cx18_vapi() error: we previously assumed 'cx' could be null (see line 833)

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/pci/cx18/cx18-mailbox.c