diff options
author | Colin Ian King <colin.king@canonical.com> | 2018-02-05 17:08:52 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-03-14 07:35:50 +0300 |
commit | 0cbfeef230571b132d2ac2ea4346b200b311258f (patch) | |
tree | 063f0aed121e17c507286e393c0cd0755d96539f /drivers/nvdimm | |
parent | 3ffb0ba9b567a8efb9a04ed3d1ec15ff333ada22 (diff) | |
download | linux-0cbfeef230571b132d2ac2ea4346b200b311258f.tar.xz |
libnvdimm: remove redundant assignment to pointer 'dev'
Pointer dev is being assigned a value that is never read, it is being
re-assigned the same value later on, hence the initialization is redundant
and can be removed.
Cleans up clang warning:
drivers/nvdimm/pfn_devs.c:307:17: warning: Value stored to 'dev' during
its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm')
-rw-r--r-- | drivers/nvdimm/pfn_devs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/pfn_devs.c b/drivers/nvdimm/pfn_devs.c index f5c4e8c6e29d..2f4d18752c97 100644 --- a/drivers/nvdimm/pfn_devs.c +++ b/drivers/nvdimm/pfn_devs.c @@ -304,7 +304,7 @@ static const struct attribute_group *nd_pfn_attribute_groups[] = { struct device *nd_pfn_devinit(struct nd_pfn *nd_pfn, struct nd_namespace_common *ndns) { - struct device *dev = &nd_pfn->dev; + struct device *dev; if (!nd_pfn) return NULL; |