* [2.6 patch] drivers/media/video/cafe_ccic.c: fix NULL dereference
@ 2006-12-18 3:46 Adrian Bunk
0 siblings, 0 replies; only message in thread
From: Adrian Bunk @ 2006-12-18 3:46 UTC (permalink / raw)
To: Jonathan Corbet; +Cc: mchehab, v4l-dvb-maintainer, linux-kernel
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>
--- linux-2.6.20-rc1-mm1/drivers/media/video/cafe_ccic.c.old 2006-12-18 01:14:24.000000000 +0100
+++ linux-2.6.20-rc1-mm1/drivers/media/video/cafe_ccic.c 2006-12-18 01:21:29.000000000 +0100
@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_d
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-12-18 3:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-18 3:46 [2.6 patch] drivers/media/video/cafe_ccic.c: fix NULL dereference Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox