Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 227101
b: refs/heads/master
c: 39de521
h: refs/heads/master
i:
  227099: dac7324
v: v3
  • Loading branch information
Jesper Juhl authored and Dmitry Torokhov committed Nov 20, 2010
1 parent 09ea61a commit b6cb314
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc95df78c4566327086d44f1bfab984a70dc4d6b
refs/heads/master: 39de52104dd92bc0548a20201350111dc9317df9
5 changes: 5 additions & 0 deletions trunk/drivers/input/serio/hil_mlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,11 @@ int hil_mlc_register(hil_mlc *mlc)
hil_mlc_copy_di_scratch(mlc, i);
mlc_serio = kzalloc(sizeof(*mlc_serio), GFP_KERNEL);
mlc->serio[i] = mlc_serio;
if (!mlc->serio[i]) {
for (; i >= 0; i--)
kfree(mlc->serio[i]);
return -ENOMEM;
}
snprintf(mlc_serio->name, sizeof(mlc_serio->name)-1, "HIL_SERIO%d", i);
snprintf(mlc_serio->phys, sizeof(mlc_serio->phys)-1, "HIL%d", i);
mlc_serio->id = hil_mlc_serio_id;
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/input/serio/hp_sdc_mlc.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ static void hp_sdc_mlc_out(hil_mlc *mlc)
static int __init hp_sdc_mlc_init(void)
{
hil_mlc *mlc = &hp_sdc_mlc;
int err;

#ifdef __mc68000__
if (!MACH_IS_HP300)
Expand All @@ -323,22 +324,21 @@ static int __init hp_sdc_mlc_init(void)
mlc->out = &hp_sdc_mlc_out;
mlc->priv = &hp_sdc_mlc_priv;

if (hil_mlc_register(mlc)) {
err = hil_mlc_register(mlc);
if (err) {
printk(KERN_WARNING PREFIX "Failed to register MLC structure with hil_mlc\n");
goto err0;
return err;
}

if (hp_sdc_request_hil_irq(&hp_sdc_mlc_isr)) {
printk(KERN_WARNING PREFIX "Request for raw HIL ISR hook denied\n");
goto err1;
if (hil_mlc_unregister(mlc))
printk(KERN_ERR PREFIX "Failed to unregister MLC structure with hil_mlc.\n"
"This is bad. Could cause an oops.\n");
return -EBUSY;
}

return 0;
err1:
if (hil_mlc_unregister(mlc))
printk(KERN_ERR PREFIX "Failed to unregister MLC structure with hil_mlc.\n"
"This is bad. Could cause an oops.\n");
err0:
return -EBUSY;
}

static void __exit hp_sdc_mlc_exit(void)
Expand Down

0 comments on commit b6cb314

Please sign in to comment.