[PATCH 5.15 194/207] coredump: fix error handling for replace_fd()