Commit b1919be8 authored by Pavel Emelyanov's avatar Pavel Emelyanov

pipes: Cleanup pipe data collecting code

Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 3b8fef52
...@@ -52,10 +52,7 @@ static int handle_pipes_data(void) ...@@ -52,10 +52,7 @@ static int handle_pipes_data(void)
struct pipe_data_entry pde; struct pipe_data_entry pde;
ret = read_img_eof(fd, &pde); ret = read_img_eof(fd, &pde);
if (ret < 0) if (ret <= 0)
goto err;
if (ret == 0)
break; break;
list_for_each_entry(pi, &pipes, list) { list_for_each_entry(pi, &pipes, list) {
...@@ -71,7 +68,7 @@ static int handle_pipes_data(void) ...@@ -71,7 +68,7 @@ static int handle_pipes_data(void)
break; break;
} }
} }
err:
close(fd); close(fd);
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment