gadgetfs: set the error code