From: Jeff Dike Date: Tue, 16 Oct 2007 08:26:40 +0000 (-0700) Subject: uml: fix error cleanup ordering X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=79f662334fefa2dd3fdf66c44a4d2dca5e378ab4;p=linux-beck.git uml: fix error cleanup ordering I messed up the error cleanup ordering in the console port driver. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index 1c8efd95c421..d8acf7470e70 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c @@ -216,10 +216,10 @@ void *port_data(int port_num) .telnetd_pid = -1 }); goto out; - out_free: - kfree(port); out_close: os_close_file(fd); + out_free: + kfree(port); out: up(&ports_sem); return dev;