persistent_ram: fix wrong error code

need to be "return -EINVAL" on error

Change-Id: Ie465ecc4ebf64e205994829af8b33481c6139b64