Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19296
b: refs/heads/master
c: 77fc46c
h: refs/heads/master
v: v3
  • Loading branch information
Dmitry Torokhov committed Jan 30, 2006
1 parent ccd7343 commit be52a2f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 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: c7fd018d75cae2b0c1cf03003b38f4c76e3df826
refs/heads/master: 77fc46ca5b331df3fc0ffef24012ba0d51d601b3
18 changes: 12 additions & 6 deletions trunk/drivers/input/joystick/gamecon.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,9 +706,11 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads)
sprintf(gc->phys[i], "%s/input%d", gc->pd->port->name, i);
err = gc_setup_pad(gc, i, pads[i]);
if (err)
goto err_free_devs;
goto err_unreg_devs;

input_register_device(gc->dev[i]);
err = input_register_device(gc->dev[i]);
if (err)
goto err_free_dev;
}

if (!gc->pads[0]) {
Expand All @@ -720,9 +722,12 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads)
parport_put_port(pp);
return gc;

err_free_devs:
err_free_dev:
input_free_device(gc->dev[i]);
err_unreg_devs:
while (--i >= 0)
input_unregister_device(gc->dev[i]);
if (gc->dev[i])
input_unregister_device(gc->dev[i]);
err_free_gc:
kfree(gc);
err_unreg_pardev:
Expand All @@ -733,7 +738,7 @@ static struct gc __init *gc_probe(int parport, int *pads, int n_pads)
return ERR_PTR(err);
}

static void __exit gc_remove(struct gc *gc)
static void gc_remove(struct gc *gc)
{
int i;

Expand Down Expand Up @@ -771,7 +776,8 @@ static int __init gc_init(void)

if (err) {
while (--i >= 0)
gc_remove(gc_base[i]);
if (gc_base[i])
gc_remove(gc_base[i]);
return err;
}

Expand Down

0 comments on commit be52a2f

Please sign in to comment.