Skip to content

Commit

Permalink
libnvdimm: remove redundant assignment to pointer 'dev'
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Colin Ian King authored and djbw committed Mar 14, 2018
1 parent 3ffb0ba commit 0cbfeef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/nvdimm/pfn_devs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0cbfeef

Please sign in to comment.