From: Frank Mori Hess Date: Wed, 7 Nov 2001 20:33:31 +0000 (+0000) Subject: took into account possibility of pci_enable_device failure X-Git-Tag: r0_7_61~13 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7e088861bb8bc10d5e00022083f0ffbd23e1ddf2;p=comedi.git took into account possibility of pci_enable_device failure --- diff --git a/comedi/drivers/mite.c b/comedi/drivers/mite.c index 11f8681a..eb384f06 100644 --- a/comedi/drivers/mite.c +++ b/comedi/drivers/mite.c @@ -150,7 +150,10 @@ int mite_setup(struct mite_struct *mite) #if LINUX_VERSION_CODE < 0x020300 addr=mite->pcidev->base_address[0]; #else - pci_enable_device(mite->pcidev); + if(pci_enable_device(mite->pcidev)){ + printk("error enabling mite\n"); + return -EIO; + } pci_set_master(mite->pcidev); addr=mite->pcidev->resource[0].start; #endif