Skip to content
Commit 447b167b authored by Li Zhijian's avatar Li Zhijian Committed by Ira Weiny
Browse files

nvdimm: Remove dead code for ENODEV checking in scan_labels()



The only way create_namespace_pmem() returns an ENODEV code is if
select_pmem_id(nd_region, &uuid) returns ENODEV when its 2nd parameter
is a null pointer. However, this is impossible because &uuid is always
valid.

Furthermore, create_namespace_pmem() is the only user of
select_pmem_id(), it's safe to remove the 'return -ENODEV' branch.

Signed-off-by: default avatarLi Zhijian <lizhijian@fujitsu.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Link: https://patch.msgid.link/20240819062045.1481298-2-lizhijian@fujitsu.com


Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
parent 62c2aa6b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment