From: David Hardeman Date: Sat, 2 Dec 2006 23:16:05 +0000 (-0200) Subject: V4L/DVB (4878): budget-ci IR: be more verbose in case of init failure X-Git-Tag: v2.6.20-rc2~85^2~18^2~58 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ee579bc9332ef8a67e20f512e7bc91e3efb92225;p=linux-2.6-omap-h63xx.git V4L/DVB (4878): budget-ci IR: be more verbose in case of init failure Trivial change to help the user understand what went wrong. Taken from Darren Salt's dvb-ir patchset. Signed-off-by: Darren Salt Signed-off-by: David Hardeman Signed-off-by: Andrew de Quincey Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c index b2869ab8b7b..c34b5d3bdde 100644 --- a/drivers/media/dvb/ttpci/budget-ci.c +++ b/drivers/media/dvb/ttpci/budget-ci.c @@ -202,6 +202,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) budget_ci->ir.dev = input_dev = input_allocate_device(); if (!input_dev) { + printk(KERN_ERR "budget_ci: IR interface initialisation failed\n"); error = -ENOMEM; goto out1; } @@ -1124,7 +1125,7 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio struct budget_ci *budget_ci; int err; - budget_ci = kmalloc(sizeof(struct budget_ci), GFP_KERNEL); + budget_ci = kzalloc(sizeof(struct budget_ci), GFP_KERNEL); if (!budget_ci) { err = -ENOMEM; goto out1; @@ -1132,8 +1133,6 @@ static int budget_ci_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio dprintk(2, "budget_ci: %p\n", budget_ci); - budget_ci->budget.ci_present = 0; - dev->ext_priv = budget_ci; err = ttpci_budget_init(&budget_ci->budget, dev, info, THIS_MODULE);