diff options
Diffstat (limited to 'arch/um/drivers/net_user.c')
-rw-r--r-- | arch/um/drivers/net_user.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/um/drivers/net_user.c b/arch/um/drivers/net_user.c index 0e2f06187ea7..0a7786e00cfb 100644 --- a/arch/um/drivers/net_user.c +++ b/arch/um/drivers/net_user.c | |||
@@ -182,7 +182,9 @@ static int change_tramp(char **argv, char *output, int output_len) | |||
182 | pe_data.stdout = fds[1]; | 182 | pe_data.stdout = fds[1]; |
183 | pid = run_helper(change_pre_exec, &pe_data, argv, NULL); | 183 | pid = run_helper(change_pre_exec, &pe_data, argv, NULL); |
184 | 184 | ||
185 | read_output(fds[0], output, output_len); | 185 | if (pid > 0) /* Avoid hang as we won't get data in failure case. */ |
186 | read_output(fds[0], output, output_len); | ||
187 | |||
186 | os_close_file(fds[0]); | 188 | os_close_file(fds[0]); |
187 | os_close_file(fds[1]); | 189 | os_close_file(fds[1]); |
188 | 190 | ||