From 7e088861bb8bc10d5e00022083f0ffbd23e1ddf2 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Wed, 7 Nov 2001 20:33:31 +0000 Subject: [PATCH] took into account possibility of pci_enable_device failure --- comedi/drivers/mite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- 2.26.2