From cc87632f1665cdb26d913f2b76f0728b23a35d56 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Fri, 14 Sep 2012 18:24:43 +0400 Subject: [PATCH] tty: Handle tty collecting error Signed-off-by: Pavel Emelyanov --- tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tty.c b/tty.c index dda5a2257..408f34123 100644 --- a/tty.c +++ b/tty.c @@ -842,10 +842,10 @@ int collect_tty(void) ret = collect_image(CR_FD_TTY_INFO, PB_TTY_INFO, sizeof(struct tty_info_entry), collect_one_tty_info_entry); - - ret = collect_image(CR_FD_TTY, PB_TTY, - sizeof(struct tty_info), - collect_one_tty); + if (!ret) + ret = collect_image(CR_FD_TTY, PB_TTY, + sizeof(struct tty_info), + collect_one_tty); return ret; }