Skip to content

Commit be521bf

Browse files
author
Hans Verkuil
committed
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>
1 parent 65b8c8c commit be521bf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/media/pci/cx18/cx18-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ int cx18_vapi(struct cx18 *cx, u32 cmd, int args, ...)
831831
int i;
832832

833833
if (cx == NULL) {
834-
CX18_ERR("cx == NULL (cmd=%x)\n", cmd);
834+
pr_err("cx == NULL (cmd=%x)\n", cmd);
835835
return 0;
836836
}
837837
if (args > MAX_MB_ARGUMENTS) {

0 commit comments

Comments
 (0)