fifo.c: Eliminate logically dead code (Coverity 1437635)

This commit is contained in:
Joel Sherrill
2019-03-13 10:06:45 -05:00
parent 90232bcf45
commit 11eb818e88

View File

@@ -149,18 +149,15 @@ static int pipe_new(
pipe = *pipep;
if (pipe == NULL) {
err = pipe_alloc(&pipe);
if (err)
goto out;
if (err) {
pipe_unlock();
return err;
}
}
PIPE_LOCK(pipe);
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
else
*pipep = pipe;
}
*pipep = pipe;
out:
pipe_unlock();