libnvdimm, pmem: Fix memcpy_mcsafe() return code handling in nsio_rw_bytes()
[linux-2.6-microblaze.git] / drivers / nvdimm / claim.c
index 2e96b34..fb667bf 100644 (file)
@@ -278,6 +278,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
                        return -EIO;
                if (memcpy_mcsafe(buf, nsio->addr + offset, size) != 0)
                        return -EIO;
+               return 0;
        }
 
        if (unlikely(is_bad_pmem(&nsio->bb, sector, sz_align))) {