[linux-dvb] [patch 4/8] budget-ci IR: be more verbose in case of init failure

David Härdeman david at hardeman.nu
Tue Oct 3 02:01:54 CEST 2006


Trivial change to help the user understand what went wrong.

Taken from Darren Salt's dvb-ir patchset.

Signed-off-by: Darren Salt <linux at youmustbejoking.demon.co.uk>
Signed-off-by: David Härdeman <david at hardeman.nu>


Index: v4l-dvb/linux/drivers/media/dvb/ttpci/budget-ci.c
===================================================================
--- v4l-dvb.orig/linux/drivers/media/dvb/ttpci/budget-ci.c	2006-10-02 19:10:06.000000000 +0200
+++ v4l-dvb/linux/drivers/media/dvb/ttpci/budget-ci.c	2006-10-02 19:22:13.000000000 +0200
@@ -198,6 +198,7 @@
 
 	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;
 	}
@@ -1123,7 +1124,7 @@
 	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;
@@ -1131,8 +1132,6 @@
 
 	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);

--
David Härdeman




More information about the linux-dvb mailing list