summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wct1xxp.c
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-10-22 11:44:54 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2008-10-22 11:44:54 +0000
commit823f7bf474369da8edf465ea11b930e0680726ed (patch)
tree3073e9eef236c7121c599e501f43fc74c9ea0a37 /drivers/dahdi/wct1xxp.c
parentafa5e18baf165fea6232d4e254eb2b2b35f7df10 (diff)
wct1xxp: fix error handling at device startup.
And also give more useful error messages if things go bad. (closes issue #13607) Patches: wct1xxp_pci.diff uploaded by tzafrir (license 46) Tested by: klaus3000 git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@5118 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/wct1xxp.c')
-rw-r--r--drivers/dahdi/wct1xxp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/dahdi/wct1xxp.c b/drivers/dahdi/wct1xxp.c
index 53abb63..3b0f5b9 100644
--- a/drivers/dahdi/wct1xxp.c
+++ b/drivers/dahdi/wct1xxp.c
@@ -1273,11 +1273,13 @@ static int __devinit t1xxp_init_one(struct pci_dev *pdev, const struct pci_devic
unsigned int *canary;
unsigned int x;
- if (!pci_enable_device(pdev)) {
+ if (pci_enable_device(pdev)) {
+ printk(KERN_ERR "%s: pci_enable_device failed\n", __FUNCTION__);
return -EIO;
}
if (!(wc = kmalloc(sizeof(*wc), GFP_KERNEL))) {
+ printk(KERN_ERR "%s: Failed allocation a wc\n", __FUNCTION__);
return -ENOMEM;
}