Prevent extra EPS header validations by Yay295 · Pull Request #8144 · python-pillow/Pillow
This is the only return statement in this function, and it appears to be unnecessary since breaking from the loop at this location accomplishes the same thing, and matches what the rest of this loop does.
The only change is that check_required_header_comments() is called at the end of the function. This was being skipped before due to the early return, but it will be called now that it's just breaking from the loop.
Before 8f75cc2 this return was inside a nested loop, so breaking wouldn't have worked, but now it does. Also, check_required_header_comments() didn't exist at that time, so the early return wasn't skipping anything.