提交 0cbfeef2 编写于 作者: C Colin Ian King 提交者: Dan Williams

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: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NRoss Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: NDan Williams <dan.j.williams@intel.com>
上级 3ffb0ba9
...@@ -304,7 +304,7 @@ static const struct attribute_group *nd_pfn_attribute_groups[] = { ...@@ -304,7 +304,7 @@ static const struct attribute_group *nd_pfn_attribute_groups[] = {
struct device *nd_pfn_devinit(struct nd_pfn *nd_pfn, struct device *nd_pfn_devinit(struct nd_pfn *nd_pfn,
struct nd_namespace_common *ndns) struct nd_namespace_common *ndns)
{ {
struct device *dev = &nd_pfn->dev; struct device *dev;
if (!nd_pfn) if (!nd_pfn)
return NULL; return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册