]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/nvdimm/claim.c
net: phy: bcm7xxx: define soft_reset for 40nm EPHY
[linux.git] / drivers / nvdimm / claim.c
index 26c1c761889149f930d44f0ce29b9e86159b6ede..2985ca949912d050f364afb99128b2da036d5072 100644 (file)
@@ -255,7 +255,7 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
        struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
        unsigned int sz_align = ALIGN(size + (offset & (512 - 1)), 512);
        sector_t sector = offset >> 9;
-       int rc = 0;
+       int rc = 0, ret = 0;
 
        if (unlikely(!size))
                return 0;
@@ -293,7 +293,9 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
        }
 
        memcpy_flushcache(nsio->addr + offset, buf, size);
-       nvdimm_flush(to_nd_region(ndns->dev.parent));
+       ret = nvdimm_flush(to_nd_region(ndns->dev.parent), NULL);
+       if (ret)
+               rc = ret;
 
        return rc;
 }