drivers/media/video/cafe_ccic.c: fix NULL dereference
PATCH 1/1 drivers/media/video/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 <[email protected]>
drivers/media/video/cafe_ccic.c renamed from drivers/media/video/cafe_ccic.c.old +1 -1
@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_dstruct 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);