summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-08-30 15:01:48 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-08-30 15:01:48 +0000
commit8f30d6e37f1ea1d6e37a159e108c8d628a14f31a (patch)
treeeb774d33b4c2bd1846d458cbea05f627b59d6dd3 /linux/drivers/media/video/cx88/cx88-video.c
parent94627c1ab5e9c28d6a4bbddaf3ac71fbdaeead9a (diff)
downloadmediapointer-dvb-s2-8f30d6e37f1ea1d6e37a159e108c8d628a14f31a.tar.gz
mediapointer-dvb-s2-8f30d6e37f1ea1d6e37a159e108c8d628a14f31a.tar.bz2
- Some error treatment implemented at resume functions.
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 705485ea7..12a933084 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.89 2005/08/17 20:55:37 catalin Exp $
+ * $Id: cx88-video.c,v 1.90 2005/08/30 15:01:48 mchehab Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -2307,12 +2307,28 @@ static int cx8800_resume(struct pci_dev *pci_dev)
{
struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
struct cx88_core *core = dev->core;
+ int err;
if (dev->state.disabled) {
- pci_enable_device(pci_dev);
+ err=pci_enable_device(pci_dev);
+ if (err) {
+ printk(KERN_ERR "%s: can't enable device\n",
+ core->name);
+ return err;
+ }
+
dev->state.disabled = 0;
}
- pci_set_power_state(pci_dev, PCI_D0);
+ err= pci_set_power_state(pci_dev, PCI_D0);
+ if (err) {
+ printk(KERN_ERR "%s: can't enable device\n",
+ core->name);
+
+ pci_disable_device(pci_dev);
+ dev->state.disabled = 1;
+
+ return err;
+ }
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
pci_restore_state(pci_dev, dev->state.pci_cfg);
#else