Staging: w35und: more simplify hal_init_hardware() error handling
authorPekka Enberg <penberg@cs.helsinki.fi>
Wed, 8 Apr 2009 08:14:00 +0000 (11:14 +0300)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:37 +0000 (11:00 -0700)
commita39ee671746b6483c6a259fef755a4a3e475e3e4
tree94a2be12816f509ff25ded741cbf36647651eb39
parent00e2e05dd08bc15b09514f5ce35f0b9a3534e9ba
Staging: w35und: more simplify hal_init_hardware() error handling

Impact: fix, cleanup

If initialization in hal_init_hardware() fails, we call hal_halt() to
clean up and release resource. However, hal_halt() will attempt to
call del_timer_sync() on ->LEDTimer on "stage 3" although it's not
initialized at that point. Fix that up by simplifying error handling
logic in hal_init_hardware() with gotos.

Acked-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/winbond/wbusb.c