[PATCH 5/8 linux-next] libnvdimm: remove else after return in nsio_rw_bytes()
From: Fabian Frederick
Date: Fri Dec 02 2016 - 14:21:30 EST
else after return is not needed.
Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
drivers/nvdimm/claim.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
index d5dc80c..c0c113e 100644
--- a/drivers/nvdimm/claim.c
+++ b/drivers/nvdimm/claim.c
@@ -238,11 +238,10 @@ static int nsio_rw_bytes(struct nd_namespace_common *ndns,
if (unlikely(is_bad_pmem(&nsio->bb, offset / 512, sz_align)))
return -EIO;
return memcpy_from_pmem(buf, nsio->addr + offset, size);
- } else {
- memcpy_to_pmem(nsio->addr + offset, buf, size);
- nvdimm_flush(to_nd_region(ndns->dev.parent));
}
+ memcpy_to_pmem(nsio->addr + offset, buf, size);
+ nvdimm_flush(to_nd_region(ndns->dev.parent));
return 0;
}
--
2.7.4