summaryrefslogtreecommitdiffstats
path: root/drivers/media/pci
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil-cisco@xs4all.nl>2023-10-13 09:43:55 +0200
committerHans Verkuil <hverkuil-cisco@xs4all.nl>2023-10-13 11:33:22 +0200
commitbe521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6 (patch)
treebacabddf4ed5b69f4c3b826205680aeae579b394 /drivers/media/pci
parent65b8c8cb2bf5f5676b5f0628a455c2982aa09683 (diff)
downloadlinux-stable-be521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6.tar.gz
linux-stable-be521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6.tar.bz2
linux-stable-be521bf7bfad4e4bd4c3e1d2853aeb563a1e51d6.zip
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>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r--drivers/media/pci/cx18/cx18-mailbox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/cx18/cx18-mailbox.c b/drivers/media/pci/cx18/cx18-mailbox.c
index 3b283f3c6726..a6457c23d18c 100644
--- a/drivers/media/pci/cx18/cx18-mailbox.c
+++ b/drivers/media/pci/cx18/cx18-mailbox.c
@@ -831,7 +831,7 @@ int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...)
int i;
if (cx == NULL) {
- CX18_ERR("cx == NULL (cmd=%x)\n", cmd);
+ pr_err("cx == NULL (cmd=%x)\n", cmd);
return 0;
}
if (args > MAX_MB_ARGUMENTS) {