diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-10-08 02:46:30 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-10-08 02:46:30 +0300 |
commit | e476f94482fc20a23b7b33b3d8e50f1953f71828 (patch) | |
tree | 8ac0e5812ea683b348bb70ba8c0d513e2a8f5739 /drivers/dax/pmem.c | |
parent | 178d6f4be8bf42b298bedf8ea2a00754100e0c4e (diff) | |
parent | 4e65e9381c7ac211ec2133e473fcbdd8656c779a (diff) | |
download | linux-e476f94482fc20a23b7b33b3d8e50f1953f71828.tar.xz |
Merge branch 'for-4.9/dax' into libnvdimm-for-next
Diffstat (limited to 'drivers/dax/pmem.c')
-rw-r--r-- | drivers/dax/pmem.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/dax/pmem.c b/drivers/dax/pmem.c index 1f01e98c83c7..9630d8837ba9 100644 --- a/drivers/dax/pmem.c +++ b/drivers/dax/pmem.c @@ -24,7 +24,7 @@ struct dax_pmem { struct completion cmp; }; -struct dax_pmem *to_dax_pmem(struct percpu_ref *ref) +static struct dax_pmem *to_dax_pmem(struct percpu_ref *ref) { return container_of(ref, struct dax_pmem, ref); } @@ -61,6 +61,7 @@ static int dax_pmem_probe(struct device *dev) int rc; void *addr; struct resource res; + struct dax_dev *dax_dev; struct nd_pfn_sb *pfn_sb; struct dax_pmem *dax_pmem; struct nd_region *nd_region; @@ -126,12 +127,12 @@ static int dax_pmem_probe(struct device *dev) return -ENOMEM; /* TODO: support for subdividing a dax region... */ - rc = devm_create_dax_dev(dax_region, &res, 1); + dax_dev = devm_create_dax_dev(dax_region, &res, 1); /* child dax_dev instances now own the lifetime of the dax_region */ dax_region_put(dax_region); - return rc; + return PTR_ERR_OR_ZERO(dax_dev); } static struct nd_device_driver dax_pmem_driver = { |