diff --git a/libavformat/hls.c b/libavformat/hls.c
index 253463edf67bccc847b45bb0a6f832fbcc728288..cda65cd3623459ff41ea7bbb54d323c640ee6beb 100644
--- a/libavformat/hls.c
+++ b/libavformat/hls.c
@@ -420,8 +420,6 @@ reload:
     ret = ffurl_read(v->input, buf, buf_size);
     if (ret > 0)
         return ret;
-    if (ret < 0 && ret != AVERROR_EOF)
-        return ret;
     ffurl_close(v->input);
     v->input = NULL;
     v->cur_seq_no++;