]> err.no Git - linux-2.6/commitdiff
uml: fix error cleanup ordering
authorJeff Dike <jdike@addtoit.com>
Tue, 16 Oct 2007 08:26:40 +0000 (01:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Tue, 16 Oct 2007 16:43:04 +0000 (09:43 -0700)
I messed up the error cleanup ordering in the console port driver.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/drivers/port_kern.c

index 1c8efd95c421946ab5e7e56db518395c1847378b..d8acf7470e70719c3064f40d445ffd0cbff5d149 100644 (file)
@@ -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;