Avoid dup'ing file descriptors when not necessary.
Do not send fd to the client if ops->get_fd() fails.

diff --git a/server/serial.c b/server/serial.c
index 7d30d4d..f32f8a3 100644
--- a/server/serial.c
+++ b/server/serial.c
@@ -154,7 +154,7 @@
 {
     struct serial *serial = (struct serial *)obj;
     assert( obj->ops == &serial_ops );
-    return dup( serial->obj.fd );
+    return serial->obj.fd;
 }
 
 static int serial_get_info( struct object *obj, struct get_file_info_request *req )