Skip to content
Commit b6135210 authored by Yi Yang's avatar Yi Yang Committed by Ira Weiny
Browse files

nvdimm: rectify the illogical code within nd_dax_probe()



When nd_dax is NULL, nd_pfn is consequently NULL as well. Nevertheless,
it is inadvisable to perform pointer arithmetic or address-taking on a
NULL pointer.
Introduce the nd_dax_devinit() function to enhance the code's logic and
improve its readability.

Signed-off-by: default avatarYi Yang <yiyang13@huawei.com>
Reviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Link: https://patch.msgid.link/20241108085526.527957-1-yiyang13@huawei.com


Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
parent f7f50742
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