Răsfoiți Sursa

V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference

We shouldn't dereference "cam" when we already know it's NULL.
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Adrian Bunk 18 ani în urmă
părinte
comite
d4f60baf78
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      drivers/media/video/cafe_ccic.c

+ 1 - 1
drivers/media/video/cafe_ccic.c

@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_dev *pdev)
 	struct cafe_camera *cam = cafe_find_by_pdev(pdev);
 
 	if (cam == NULL) {
-		cam_warn(cam, "pci_remove on unknown pdev %p\n", pdev);
+		printk(KERN_WARNING "pci_remove on unknown pdev %p\n", pdev);
 		return;
 	}
 	mutex_lock(&cam->s_mutex);