summaryrefslogtreecommitdiff
path: root/drivers/nvdimm
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2018-01-30 20:47:07 +0300
committerRoss Zwisler <ross.zwisler@linux.intel.com>2018-02-03 10:23:01 +0300
commit59858d3d54cfad1f8db67c2c07e4dd33bb6ed955 (patch)
tree445f9c7d4fd929183556fdfe9d76a7a0e32051e5 /drivers/nvdimm
parent23fbd7c70aec7600e3227eb24259fc55bf6e4881 (diff)
downloadlinux-59858d3d54cfad1f8db67c2c07e4dd33bb6ed955.tar.xz
libnvdimm, namespace: remove redundant initialization of 'nd_mapping'
Pointer nd_mapping is being initialized to a value that is never read, instead it is being updated to a new value in all the cases where it is being read afterwards, hence the initialization is redundant and can be removed. Cleans up clang warning: drivers/nvdimm/namespace_devs.c:2411:21: warning: Value stored to 'nd_mapping' during its initialization is never rea Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com> Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r--drivers/nvdimm/namespace_devs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index bb3ba8cf24d4..658ada497be0 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -2408,7 +2408,7 @@ static struct device **scan_labels(struct nd_region *nd_region)
static struct device **create_namespaces(struct nd_region *nd_region)
{
- struct nd_mapping *nd_mapping = &nd_region->mapping[0];
+ struct nd_mapping *nd_mapping;
struct device **devs;
int i;