From 823f7bf474369da8edf465ea11b930e0680726ed Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 22 Oct 2008 11:44:54 +0000 Subject: 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 --- drivers/dahdi/wct1xxp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'drivers/dahdi/wct1xxp.c') 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; } -- cgit v1.2.3