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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Trivial change to help the user understand what went wrong.

Taken from Darren Salt's dvb-ir patchset.

Signed-off-by: Darren Salt <linux@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Signed-off-by: David Härdeman <david@xxxxxxxxxxx>


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


_______________________________________________
linux-dvb mailing list
linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb


[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux