From: Arjan van de Ven Fix an oops I got when loading mk712; I don't have the hardware so there is a goto to the cleanup part of the function. The goto however went to then input_free_device() of a pointer that only gets initialized to a real value 3 lines lower, much to the unhappiness of the code in question. Fix is just to make a stacked-label sequence for it instead. Signed-off-by: Arjan van de Ven Signed-off-by: Andrew Morton --- drivers/input/touchscreen/mk712.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/input/touchscreen/mk712.c~input-fix-oops-on-mk712-load drivers/input/touchscreen/mk712.c --- devel/drivers/input/touchscreen/mk712.c~input-fix-oops-on-mk712-load 2006-04-23 15:31:38.000000000 -0700 +++ devel-akpm/drivers/input/touchscreen/mk712.c 2006-04-23 15:31:38.000000000 -0700 @@ -170,7 +170,7 @@ static int __init mk712_init(void) (inw(mk712_io + MK712_STATUS) & 0xf333)) { printk(KERN_WARNING "mk712: device not present\n"); err = -ENODEV; - goto fail; + goto fail_release; } if (!(mk712_dev = input_allocate_device())) { @@ -204,6 +204,7 @@ static int __init mk712_init(void) return 0; fail: input_free_device(mk712_dev); + fail_release: release_region(mk712_io, 8); return err; } _