提交 d4f60baf 编写于 作者: A Adrian Bunk 提交者: Mauro Carvalho Chehab

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: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 d82d418a
...@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_dev *pdev) ...@@ -2166,7 +2166,7 @@ static void cafe_pci_remove(struct pci_dev *pdev)
struct cafe_camera *cam = cafe_find_by_pdev(pdev); struct cafe_camera *cam = cafe_find_by_pdev(pdev);
if (cam == NULL) { 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; return;
} }
mutex_lock(&cam->s_mutex); mutex_lock(&cam->s_mutex);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册