-EINVAL means the arguments were somehow wrong, so translate the code we get internally into -EBADMSG when returning.