summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/budget.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/budget.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c
index 3188406f7..6709a1867 100644
--- a/linux/drivers/media/dvb/ttpci/budget.c
+++ b/linux/drivers/media/dvb/ttpci/budget.c
@@ -151,15 +151,18 @@ int budget_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
static
int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info)
{
- struct budget *budget;
+ struct budget *budget = NULL;
int err;
- if (!(budget = kmalloc (sizeof(struct budget), GFP_KERNEL)))
+ budget = kmalloc(sizeof(struct budget), GFP_KERNEL);
+ if( NULL == budget ) {
return -ENOMEM;
+ }
- DEB_EE(("budget: %p\n",budget));
+ DEB_EE(("dev:%p, info:%p, budget:%p\n",dev,info,budget));
if ((err = ttpci_budget_init (budget, dev, info))) {
+ printk("==> failed\n");
kfree (budget);
return err;
}
@@ -185,7 +188,8 @@ int budget_detach (struct saa7146_dev* dev)
err = ttpci_budget_deinit (budget);
kfree (budget);
-
+ dev->ext_priv = NULL;
+
return err;
}
@@ -213,7 +217,7 @@ struct pci_device_id pci_tbl[] = {
}
};
-
+MODULE_DEVICE_TABLE(pci, pci_tbl);
static
struct saa7146_extension budget_extension = {