persistent_ram: fix wrong error code

need to be "return -EINVAL" on error