From d4f60baf7827c6a46b7ee2ed0a2a32a373febfcb Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Wed, 20 Dec 2006 09:34:32 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/cafe_ccic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media') diff --git a/drivers/media/video/cafe_ccic.c b/drivers/media/video/cafe_ccic.c index e347c7ebc984..3083c8075d13 100644 --- a/drivers/media/video/cafe_ccic.c +++ b/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); -- cgit v1.2.2