libnvdimm: remove redundant assignment to pointer 'dev'
authorColin Ian King <colin.king@canonical.com>
Mon, 5 Feb 2018 14:08:52 +0000 (14:08 +0000)
committerDan Williams <dan.j.williams@intel.com>
Wed, 14 Mar 2018 04:35:50 +0000 (21:35 -0700)
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>
drivers/nvdimm/pfn_devs.c

index f5c4e8c..2f4d187 100644 (file)
@@ -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;