bus: fix error check in memfd code