Only close door serial connection on error.

Signed-off-by: Paul Brook <paul@nowt.org>