Skip to content

Commit

Permalink
V4L/DVB (4991): Cafe_ccic.c: fix NULL dereference
Browse files Browse the repository at this point in the history
We shouldn't dereference "cam" when we already know it's NULL.
Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
AdrianBunk authored and mchehab committed Dec 27, 2006
1 parent d82d418 commit d4f60ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/cafe_ccic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit d4f60ba

Please sign in to comment.