interface: add return type EINVAL in CHECK_ERROR