Skip to content

Commit

Permalink
V4L/DVB (4878): budget-ci IR: be more verbose in case of init failure
Browse files Browse the repository at this point in the history
Trivial change to help the user understand what went wrong.
Taken from Darren Salt's dvb-ir patchset.

Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk>
Signed-off-by: David Hardeman <david@hardeman.nu>
Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
David Hardeman authored and Mauro Carvalho Chehab committed Dec 10, 2006
1 parent 8cc532e commit ee579bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/media/dvb/ttpci/budget-ci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -1124,16 +1125,14 @@ 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;
}

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);
Expand Down

0 comments on commit ee579bc

Please sign in to comment.