uml: fix error cleanup ordering
[linux-2.6.git] / 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;
 
                                    .telnetd_pid        = -1 });
        goto out;
 
- out_free:
-       kfree(port);
  out_close:
        os_close_file(fd);
  out_close:
        os_close_file(fd);
+ out_free:
+       kfree(port);
  out:
        up(&ports_sem);
        return dev;
  out:
        up(&ports_sem);
        return dev;