[PATCH 6.14 46/73] coredump: fix error handling for replace_fd()