]> err.no Git - linux-2.6/commitdiff
V4L/DVB (6382): saa7134: fix NULL dereference at suspend time for cards without IR...
authorMatthias Schwarzott <zzam@gentoo.org>
Thu, 18 Oct 2007 17:58:11 +0000 (14:58 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 22 Oct 2007 14:01:53 +0000 (12:01 -0200)
Calling saa7134_ir_stop at suspend is no good idea
for saa7134 cards without remote control.

Signed-off-by: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/saa7134/saa7134-core.c

index 410242a91f436f23509241e46c32a4f0c931ec07..a499eea379e65a4e3209ff5c464f5ac83c45b57a 100644 (file)
@@ -1189,7 +1189,9 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state)
        del_timer(&dev->video_q.timeout);
        del_timer(&dev->vbi_q.timeout);
        del_timer(&dev->ts_q.timeout);
-       saa7134_ir_stop(dev);
+
+       if (dev->remote)
+               saa7134_ir_stop(dev);
 
        pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
        pci_save_state(pci_dev);